Author |
Message
|
tapak |
Posted: Thu Aug 03, 2006 12:13 pm Post subject: MessageId Vs CorrelationID for request reply |
|
|
 Centurion
Joined: 26 Oct 2005 Posts: 149 Location: Hartford,CT
|
There is 4 ways we can set the message id and correlationid for request - reply . Is there any benefit on each method or is the common practice to configure with Method 3 given below.
Here is the different methods .
1. Sending request with a message id and recieving the reply with matching MessageId.
2. Sending request with a correlation id and recieving the reply with the matching CorrelationId.
3. Sending request with a message id and recieving the reply with the same message id in the Correlation id of the reply message ..
4. Sending request with a correlation id and recieving the reply with the same correlation id in the Message id of the reply message .. |
|
Back to top |
|
 |
vennela |
Posted: Thu Aug 03, 2006 12:25 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
3 is a good practice.
Usually you let the QMGR create the MesssageID, and you will have unique values across. That leaves the only choice you have is 3. |
|
Back to top |
|
 |
tapak |
Posted: Thu Aug 03, 2006 12:41 pm Post subject: |
|
|
 Centurion
Joined: 26 Oct 2005 Posts: 149 Location: Hartford,CT
|
Thank you for explaining the reason for using option 3. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 03, 2006 1:17 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
In all cases, one can allow the qmgr to create the MsgId or the CorrelId. This will ensure that the id
Only in case 1 will the Message ID ever be duplicated on network.
Only in case 2 will Correlation ID be duplicated on network.
Case 3 is the recommended approach, and what the samples show. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 03, 2006 3:18 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
However you might have multihopping between your services.
Common practice for a service provider is to do following:
a) if the request message has no correlationId (MQMI_NONE) the reply message's correlationId will be the request messageId.
b) if the request message has a correlationId the reply message will have the same correlationId.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
tapak |
Posted: Fri Aug 04, 2006 6:05 am Post subject: |
|
|
 Centurion
Joined: 26 Oct 2005 Posts: 149 Location: Hartford,CT
|
fjp_saper .
I agree with you . Option 2 and 3 give a unique message id to each message to track the message . |
|
Back to top |
|
 |
tleichen |
Posted: Fri Aug 04, 2006 12:00 pm Post subject: |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
jefflowrey wrote: |
In all cases, one can allow the qmgr to create the MsgId or the CorrelId. This will ensure that the id
Only in case 1 will the Message ID ever be duplicated on network.
Only in case 2 will Correlation ID be duplicated on network.
Case 3 is the recommended approach, and what the samples show. |
Case 3 is also the way the vendor intended it to work, as this is the way that TMs (transaction managers, i.e., IMS, CICS, etc.) interact with MQSeries. _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
|