- From: David Naramski <david@naramski.net>
- Date: Tue, 15 Jun 2010 21:37:08 +0000
- To: public-soap-jms@w3.org
- Message-ID: <AANLkTim0416a-GcqUqWSt5ej7FfqvO1JXKaNyfUbcMRX@mail.gmail.com>
I have a problem with Protocol-2038<http://www.w3.org/TR/2009/CR-soapjms-20090604/#Protocol-2038> .. It works well when you have the client (C) and the server (S) without intermediary. 1) C sends the message. The JMSMessageId "originalId" is then generated by the producer. 2) S receives directly the message. Then S copies the JMSMessageId "originalId" in the JMSCorrelationId of the response. S sends the message in the reply queue. 3) C waits for a message with JMSCorrelationId = "originalId" But if you have a less ideal infrastructure such as, two JMS brokers linked together, you can have something like this : C ----> brokerA ------> bridge ------> brokerB ------> S Then C cannot rely on the JMSMessageID to correlate the response. Actually, the bridge will read the original message and send it to the brokerB. A new JMSMessageID = "newId" is then generated by the JMS provider. The server S will respond with JMSCorrelationID = "newId" and the client C will not be able to correlate the message, because it waits on the "JMSCorrelationID = 'originalId'" selector. A solution will be to set the JMSCorrelationId at the client level. The JMSCorrelationId will be preserved during all the cycle. The protocol 2038 can be rewriten as follows : - If no JMSCorrelationID is set in the request, then S MUST copy the JMSMessageID from the original request to the JMSCorrelationID of the response. - If a JMSCorrelationID is set in the request, S MUST copy the JMSCorrelationID from original request to the JMSCorrelationID of the response. Alternatively, the protocol 2038 could be simplified as follows: - S MUST copy the JMSCorrelationID from original request to the JMSCorrelationID of the response. I have not seen the Protocol 2038 discussed in the mailing list, so I hope this issue is not a duplicate. I'm not sure how to sent my comments. I'm trying the mailing list, but if you think another way will be more appropriate, feel free to give me any instruction in that respect. You can see in *setJMSMessageID<http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Message.html#setJMSMessageID%28java.lang.String%29>that the *JMS providers set this field when a message is sent. More, you can see in *setJMSCorrelationID<http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Message.html#setJMSCorrelationID%28java.lang.String%29> * that JMSCorrelation is a mean to the client for correlating the request and the response. I hope the above is helpful and remain a your disposal for any queries you may have. Kind regards, David Naramski
Received on Wednesday, 16 June 2010 08:10:52 UTC