activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eugene Rodos (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-2840) JMSX Properties not returned from message.propertyExists() and message.getPropertyNames()
Date Thu, 19 Aug 2010 14:53:48 GMT

    [ https://issues.apache.org/activemq/browse/AMQ-2840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61292#action_61292
] 

Eugene Rodos commented on AMQ-2840:
-----------------------------------

Guys, let's read the JMS spec carefully:

The spec says that the following are standard header fields (starting with "JMS" prefix):
JMSDestination
JMSDeliveryMode
JMSExpiration
JMSPriority
JMSMessageID
JMSTimestamp
JMSCorrelationID
JMSReplyTo
JMSType
JMSRedelivered

However, the following are NOT header fields but are JMS Defined *_Properties_* (starting
with "JMSX" prefix):
JMSXUserID
JMSXAppID
JMSXDeliveryCount
JMSXGroupID
JMSXGroupSeq
JMSXProducerTXID
JMSXConsumerTXID
JMSXRcvTimestamp
JMSXState

Of these, it looks like AMQ supports 3: JMSXDeliveryCount, JMSXGroupID and JMSXGroupSeq. 
Now, the ActiveMQMessage class puts both the JMS header fields and the JMSX message properties
into the same JMS_PROPERTY_SETERS map, so i agree, returning the whole map is wrong, but the
JMSX properties MUST still be returned.

So I think the proper solution is to replace the (reverted) line:
{code}
result.addAll(new Vector<String>(JMS_PROPERTY_SETERS.keySet()));
{code}
with something like:
{code}
for (String propName : JMS_PROPERTY_SETERS.keySet()) {
    if (propName.startsWith("JMSX")) {
        propsVector.add(propName);
    }
}
{code}


> JMSX Properties not returned from message.propertyExists() and message.getPropertyNames()
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQ-2840
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2840
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0
>            Reporter: Andriy Hnativ
>            Assignee: Gary Tully
>             Fix For: 5.4.1
>
>         Attachments: patch.txt
>
>
> Methods propertyExists() and getPropertyNames() defined in the class org.apache.activemq.command.ActiveMQMessage
(activemq-core) return only custom properties. The JMSX properties (like JMSXDeliveryCount)
are not being returned. This problem exists not only for a new version of ActiveMQ (5.4),
but also for 5.3 (and probably for others as well).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message