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 » General IBM MQ Support » How does MQ message id form?

Post new topic  Reply to topic
 How does MQ message id form? « View previous topic :: View next topic » 
Author Message
humanRebody
PostPosted: Thu Feb 21, 2013 5:58 pm    Post subject: How does MQ message id form? Reply with quote

Novice

Joined: 05 Feb 2010
Posts: 15

Hi,

Does anyone know how a MQ message id form? What is is based on? I heard it is from sender machine IP address and time the message got generated. Is it true? Please advise. Thanks.

Regards,
Thomas
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Thu Feb 21, 2013 8:42 pm    Post subject: Re: How does MQ message id form? Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

If you look at a Message Id it doesn't contain an IP address or time stamp. Message Id is a unique 24 byte binary value that can be generated by a Queue Manager when a message is put to a queue. Do not make any assumptions about what is inside the Message Id, IBM could change it at any time without notice. Why do you ask?
_________________
Glenn
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Feb 22, 2013 5:34 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If you need a reliable known method of generating message ids, create one yourself and use it everywhere you send messages.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Feb 22, 2013 6:00 am    Post subject: Re: How does MQ message id form? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

humanRebody wrote:
Does anyone know how a MQ message id form?


Yes. I read it in the WMQ InfoCenter, where the method used to generate it is documented.

What is is based on? I heard it is from sender machine IP address and time the message got generated. Is it true?[/quote]

Partly; it does contain a timestamp.

gbaddeley wrote:
Do not make any assumptions about what is inside the Message Id, IBM could change it at any time without notice. Why do you ask?


Valid points. While the structure is documented, that's more to ensure you don't do something stupid with your installation that would make them non-unique. You should never need to ask how it's made up.

mqjeff wrote:
If you need a reliable known method of generating message ids, create one yourself and use it everywhere you send messages.




If you think the IBM wheel is unsuitable, invent your own.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Andyh
PostPosted: Mon Feb 25, 2013 9:49 am    Post subject: Reply with quote

Master

Joined: 29 Jul 2010
Posts: 239

Part of the MsgId is based on a timestamp, however on the distributed platforms timestamps cannot be guaranteed unique and hence it is only "based on a timestamp". For example the "timestamp" part of the MsgId cannot be used to deduce at what time the message was put.

As stated above, you should not assume that the algorithm used to generate MsgId's will remain constant, only that the queue manager will continue to generate unique MsgId's.

If you want a specific form of identifier in the messages CorrelId is better used for this purpose. Note also that (on the distributed platforms) getting by CorrelId is generally much more efficient than getting by MsgId.
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 » General IBM MQ Support » How does MQ message id form?
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.