You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robbie Gemmell (JIRA)" <ji...@apache.org> on 2016/07/08 10:19:11 UTC

[jira] [Commented] (QPIDJMS-189) Message correlation based on message ID does not work out of the box

    [ https://issues.apache.org/jira/browse/QPIDJMS-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15367495#comment-15367495 ] 

Robbie Gemmell commented on QPIDJMS-189:
----------------------------------------

Having a look at this again, and not misreading your comments this time, I see whats happened.

The methods you mention are actually working as originally intended, though as per the above there are some issues with that regardless. The actual root problem here is that the client is mistakenly sending the "ID:" prefix in the message-id on the wire which it wasnt intended to and didnt used to. A change in behaviour was introduced while refactoring the message-id handling to support different ID types/formats and a test meant to verify that behaviour isnt strict enough in its checks, meaning the change of behaviour didn't get caught. By setting the connection id prefix, you effectively restored the 'dont send ID:' behaviour and made it work in the manner originally intended.

I'll look to get a fix for this in for 0.11.0, possibly in concert with changes around the above JIRA.

> 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
>
> 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: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org