Author |
Message
|
kutulu2000 |
Posted: Wed Oct 31, 2007 8:34 am Post subject: MQ Correlation ID vs JMS Correlation ID |
|
|
 Acolyte
Joined: 08 Nov 2005 Posts: 63 Location: Mexico
|
Hi all,
We are starting to develop an application implementing SOA. This aplication is server side and the tier to connect to a queue resource must be a MDB 3.0 spec.
The client application creates messages usig the mq api and sends to a mq queue. The client application puts in the message a correlation ID indicating that the target is our server side application.
What we are trying to do is to filter the messages by correlation ID and the MDB must "catch" only the messages whose correlation ID is "MDB" (for example). Since the message is sending using MQ (MQMessage) and the MDB expects (or uses) a jms Message we can't obtain the correlation ID directly.
Someone who can guide us with this topic? I'm newbie in jms and any idea would be appreciated.
Thanxxx!!!  _________________ #10 |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 31, 2007 9:46 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Please don't use CorrelationID for this kind of filtering. In general, please don't share queues between logically unrelated functions. If the MDB only needs to receive messages that "belong" to it, then give it it's own queue, and only PUT messages that "belong" to the MDB on that queue.
In particular, under JMS, it will perform badly (i.e., no better than filtering on any other JMS Property) unless you use a very specific match for the bytes of the CorrelationID string.
And, yes, the JMS API does allow you to access the JMSCorrelationID, which the MQ JMS Provider does ensure is the same as the MQMD.CorrelID. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Oct 31, 2007 1:51 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
jefflowry wrote: |
And, yes, the JMS API does allow you to access the JMSCorrelationID, which the MQ JMS Provider does ensure is the same as the MQMD.CorrelID. |
I believe this applies only for a JMSCorrelationId <= 24 bytes.
If the correlationId is more than 24 bytes (48 +3 in the provider string hex representation of the array 'ID:xxxx') MQ truncates the correlation Id @ 24 bytes and this is what is being put to the MQMD... although the full correlationId is kept in the RFH2.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Oct 31, 2007 2:04 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
|
Back to top |
|
 |
mvic |
Posted: Wed Oct 31, 2007 2:59 pm Post subject: Re: MQ Correlation ID vs JMS Correlation ID |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
|
Back to top |
|
 |
kutulu2000 |
Posted: Wed Oct 31, 2007 3:13 pm Post subject: |
|
|
 Acolyte
Joined: 08 Nov 2005 Posts: 63 Location: Mexico
|
I'm very grateful with all of you. I'm reading and analyzing the proposals.
Soon I'll post any new idea to this.
 _________________ #10 |
|
Back to top |
|
 |
|