ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » MessageId vs. CorrelID on multi-hops

Post new topic  Reply to topic
 MessageId vs. CorrelID on multi-hops « View previous topic :: View next topic » 
Author Message
PeterPotkay
PostPosted: Fri Oct 11, 2002 9:57 am    Post subject: MessageId vs. CorrelID on multi-hops Reply with quote

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
View user's profile Send private message
bduncan
PostPosted: Fri Oct 11, 2002 2:49 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
PeterPotkay
PostPosted: Sat Oct 12, 2002 11:00 am    Post subject: Reply with quote

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
View user's profile Send private message
jsware
PostPosted: Sun Oct 13, 2002 11:05 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MessageId vs. CorrelID on multi-hops
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.