|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How does MQ message id form? |
« View previous topic :: View next topic » |
Author |
Message
|
humanRebody |
Posted: Thu Feb 21, 2013 5:58 pm Post subject: How does MQ message id form? |
|
|
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 |
|
 |
gbaddeley |
Posted: Thu Feb 21, 2013 8:42 pm Post subject: Re: How does MQ message id form? |
|
|
 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 |
|
 |
mqjeff |
Posted: Fri Feb 22, 2013 5:34 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Fri Feb 22, 2013 6:00 am Post subject: Re: How does MQ message id form? |
|
|
 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 |
|
 |
Andyh |
Posted: Mon Feb 25, 2013 9:49 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
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
|
|
|
|