[ 
https://issues.apache.org/jira/browse/QPIDJMS-189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robbie Gemmell updated QPIDJMS-189:
-----------------------------------
    Fix Version/s: 0.11.0

> Message correlation based on message ID does not work out of the box
> --------------------------------------------------------------------
>
>                 Key: QPIDJMS-189
>                 URL: https://issues.apache.org/jira/browse/QPIDJMS-189
>             Project: Qpid JMS
>          Issue Type: Bug
>          Components: qpid-jms-client
>    Affects Versions: 0.9.0
>            Reporter: Kai Hudalla
>             Fix For: 0.11.0
>
>
> I am trying to use Qpid JMS client to send a message to a non-JMS application 
> which returns a message to the client based on the request's reply-to 
> property.
> In order to correlate the response received from the non-JMS app with the 
> request, I want to use the incoming message's JMSCorrelationID property.
> The non-JMS application simply takes the incoming message's message-id 
> property and puts it into the outgoing response's correlation-id property.
> However, when I send a message using Qpid JMS with default configuration, 
> e.g. using a connection URI like {{amqp://myhost:myport}}, then the message 
> ID of the sent message retrieved via {{Message.getJMSMessageId()}} looks 
> something like {{ID:aef45f-...}} and the message-id of the incoming request 
> in the non-JMS app contains the same ID, i.e. {{ID:aef45f-...}}. However, the 
> correlation ID retrieved from the response via 
> {{Message.getJMSCorrelationId()}} at the JMS client starts with 
> {{ID:ID:aef45f-...}}, i.e. having a duplicate _ID:_ prefix, and thus cannot 
> be matched to the original message ID.
> I have tracked down the problem to the inconsistent implementation of 
> {{AmqpJmsMessageFacade}}'s {{getMessageId()}} and {{getCorrelationId()}} 
> methods. The former only adds an _ID:_ prefix to the underlying message ID if 
> it doesn't already contain that prefix whereas the latter always adds the 
> prefix (unless the {{x-opt-app-correlation-id}} header is set).
> The problem can be worked around by explicitly setting another connection ID 
> prefix using the {{jms.connectionIDPrefix}} connection URI parameter ni order 
> to define a different prefix than the default one (_ID_).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to