|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MessageId vs. CorrelID on multi-hops |
« View previous topic :: View next topic » |
Author |
Message
|
PeterPotkay |
Posted: Fri Oct 11, 2002 9:57 am Post subject: MessageId vs. CorrelID on multi-hops |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
I got a customer who thinks that for a message that will hop over 3 queue managers roundtrip, each with an application that will process the message, that the MessageID should be the same for all the messages, and the CorrelId should change between each hop (with the final reply gotten by MessageID).
I think that is wrong. I learned that no 2 messages in your system should have the same MessageID, and that the CorrelId is what ties the messages (Correlates them!) together. The final get is done by CorrelId.
As I think about it, I guess it doesn't make a difference which ID stays the same roundtrip. It just feels better to me that the CorrelId is what stays the same. Any thoughts? Any pros/cons about this that I can use to bolster my opinion? Or is it as this client says "six of one and half dozen of another"? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
bduncan |
Posted: Fri Oct 11, 2002 2:49 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
You said you were concerned (rightly so) about no 2 messages having the same MsgId. But from the way you described the system, it sounds like this will never happen. If I MQPUT a message with MsgId=1234, and the receiving application MQGETs it, that message no longer exists in the system. If a new message is MQPUT with MsgId=1234 (the second hop) there will still only be one message in the system with MsgId=1234. You can make the case that while you are doing multiple hops, you are moving the same logical request around, so perhaps keeping the same MsgId the whole time makes sense. This is one of those technical best practices versus "what just feels right" issues. If in my mind I think of each set of messages as a single request, then it might make administration easier if I attempt to maintain this notion by keeping the unique identifer (MsgId) the same. Just a thought. But clearly, this question presents logical arguments for either case. You seem to have a knack for always being the one to ask them, Peter!  _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
PeterPotkay |
Posted: Sat Oct 12, 2002 11:00 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
One point brought up is that JMS does not allow you to set the MSG-ID, so if any apps in the hop might be JMS, then right there you are forced to use CorrelID as the model. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
jsware |
Posted: Sun Oct 13, 2002 11:05 am Post subject: |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
A couple of points come to mind. Firstly, shouldn't you follow the rules specified in the report options? If the pass msg id and pass correl id flags are set shouldn't you follow those?
Also the correlation ID always seems to be blank unless you set it explicitly (or use MQPMO_NEW_CORREL_ID) whereas if the message ID is set to MQMI_NONE then it gets set, even if there is no MQPMO_NEW_MSG_ID specified (unless I'm reading amqsputc sample code incorrectly).
IMHO the message IDs should be new for each message and any correlation between message IDs should be expressed in the correlation ID (hence its name in my view).
As mentioned though, it's all about what "feels right" for a given application. |
|
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
|
|
|
|