|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How does WMB relate a Request with the Response? |
« View previous topic :: View next topic » |
Author |
Message
|
limal_raja |
Posted: Fri Jan 22, 2010 4:16 am Post subject: How does WMB relate a Request with the Response? |
|
|
Novice
Joined: 11 Nov 2009 Posts: 19
|
How does WMB relate a Request with the Response?
For eg. When I send 2 requests RQ1 and RQ2 with msgId M1 and M2 respectively, when i get the responses(say RS1 and RS2) how does the system recognize if response RS1 is for request RQ1 and not for RQ2 or vice versa? |
|
Back to top |
|
 |
mqmatt |
Posted: Fri Jan 22, 2010 4:39 am Post subject: |
|
|
 Grand Master
Joined: 04 Aug 2004 Posts: 1213 Location: Hursley, UK
|
Depends on which nodes you're using; if you're using asynchronous request nodes (e.g. SOAP or SCA), then this is managed for you.
For the general case, you need to manage the correlation identifiers yourself, using queues for example.
In V7 there is a pattern that implements request/response for you.
Regards
-Matt |
|
Back to top |
|
 |
rajparekh08 |
Posted: Sun Jan 24, 2010 11:12 pm Post subject: |
|
|
Acolyte
Joined: 21 Sep 2009 Posts: 58 Location: India- Bagalore
|
You can use co-relation ID.
LIke you can set the message ID to co relation ID, and when you get the response, you will knw from the co - relation ID. That is, if the co-relation ID is the same as the request MsgId, then you can match them. |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Jan 25, 2010 12:06 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
mqmatt wrote: |
In V7 there is a pattern that implements request/response for you.
Regards
-Matt |
I get the impression from some of the posts here that quite a few users of this forum don't know what a pattern is and how to use them.
rajparekh08 wrote: |
You can use co-relation ID.
LIke you can set the message ID to co relation ID, and when you get the response, you will knw from the co - relation ID. That is, if the co-relation ID is the same as the request MsgId, then you can match them.
|
It would be easier to understand in you used the proper name.
MSGID.CorrelId
is related to
MSGID.MsgId
in that in the MQOutputNode(etc) there is a flag which will copy the MQMD.MsgId to the MQMD.CorrelID before the message is returned. Swapping these is a quite common method of handling Request/Reply.
You can configure nodes to get a message by a match with MQMD.CorrelId or the MQMD.MsgId
See the MQGMO options description in th WMQ Application Programming Manual for a better description. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|