You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by gil-mha <mi...@gillardon.de> on 2008/04/28 17:39:21 UTC

JMS - reply messages identification - correlationId

Hi,

I have a problem using the new servicemix-jms Endpoints in a InOut-Provider
setting.

I changed from:

<jms:endpoint service="b:kalk"
                endpoint="endpoint"
                role="provider" 
                destinationStyle="queue"
                jmsProviderDestinationName="XXXKommando" 
                jmsProviderReplyToName="XXXAntwort"
                connectionFactory="#connectionFactory"
                defaultMep="http://www.w3.org/2004/08/wsdl/in-out" />

to:

<jms:provider service="b:kalk"
              endpoint="endpoint"
              destinationName="XXXKommando"
              replyDestinationName="XXXAntwort"
              pubSubDomain="false"
              connectionFactory="#connectionFactory"/>

(because i want to set additional JMS Headers with my own marshaler).


The return message will not be consumed (i can see it in the queue) with the
new endpoint configuration. I think it's a problem with the messageSelector
of the created consumer.

But first i saw, that the correlationId is not set in the JMSMessage ... i
"fixed" that in my own marshaler, but still it didn't work.

In JmsProviderEndpoint.processInOutInSession() i found the following code:

        // Create selector
        String jmsId = sendJmsMsg.getJMSMessageID();
        String selector = MSG_SELECTOR_START + jmsId + MSG_SELECTOR_END;
        //Receiving JMS Message, Creating and Returning NormalizedMessage
out
        Message receiveJmsMsg = template.receiveSelected(replyDest,
selector);

But the value of MSG_SELECTOR_START is "JMSCorrelationID='" ... so the
consumers searches for a "wrong combination" of a key/value-pair.

I did a remote debugging of my local servicemix 3.2.1 (standalone)
application ... changed the selector-value before calling receiveSelected to
the current correlation-Id and it worked. I also tried to change the key to
JMSMessageID, but this didn't work.

Can anybody confirm this behaviour as a bug? Or is there something wrong?


-- 
View this message in context: http://www.nabble.com/JMS---reply-messages-identification---correlationId-tp16941653p16941653.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.