Author |
Message
|
mehedi |
Posted: Wed May 27, 2009 12:46 pm Post subject: Are message ids unique across queue managers. ? |
|
|
Centurion
Joined: 11 Nov 2001 Posts: 102 Location: PSTech
|
Are MQ series generated message ids unique across queue managers. ?
The Database design folk want to know if it would be OK to use MQ series generated message ids as primary key ,
in a database which will be storing message information from multiple queue managers.
Ideally no message id in the universe should be a duplicate of another.
Anyone have an idea of what algorithm IBM MQ Series uses to generate message id. ?
Thanks
Mehedi |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 27, 2009 12:58 pm Post subject: Re: Are message ids unique across queue managers. ? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mehedi wrote: |
Are MQ series generated message ids unique across queue managers. ? |
If they're created to be. Remember that while it's far and away best practice to use queue manager generated ids, the application has final say, the queue manager doesn't & can't be made to enforce this.
mehedi wrote: |
Anyone have an idea of what algorithm IBM MQ Series uses to generate message id. ? |
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzak.doc/js01297.htm _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
HubertKleinmanns |
Posted: Thu Jun 04, 2009 12:04 am Post subject: Re: Are message ids unique across queue managers. ? |
|
|
 Shaman
Joined: 24 Feb 2004 Posts: 732 Location: Germany
|
Vitor wrote: |
mehedi wrote: |
Are MQ series generated message ids unique across queue managers. ? |
... |
When MQ generates the msg id and the QMgr names are unique in your network, then msg ids are also unique in your network.
But - as Vitor told - applications are able to specify a msg id by their own (possibly always the same ). _________________ Regards
Hubert |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Jun 04, 2009 5:23 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
For those locales that use Daylight Savings Time, there is the slight possibility for duplicate Message IDs for one hour a year, even if you follow all the other rules. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 04, 2009 5:30 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
PeterPotkay wrote: |
For those locales that use Daylight Savings Time, there is the slight possibility for duplicate Message IDs for one hour a year, even if you follow all the other rules. |
I thought the time used was GMT  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Jun 04, 2009 5:41 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Whoops! Your'e right. The system clock probably stays the same, as it relates to GMT. Its just that the local time is reported an hour back or forward.
So there might be duplicates for things that report with the local time (error log entries), but message IDs and timestamps in MQMD's should stay unique.
I'm getting fat and lazy with all these tools that conveniently convert the GMT time in the messages to local time for you! _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
gbaddeley |
Posted: Thu Jun 04, 2009 4:32 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
PeterPotkay wrote: |
For those locales that use Daylight Savings Time, there is the slight possibility for duplicate Message IDs for one hour a year, even if you follow all the other rules. |
Duplicate MsgIds can happen if the system clock is set to local time (and the time zone is +0), and the system admins change the system clock back an hour when going out of daylight savings. I have actually encountered this scenario! Their solution to the duplicate system time issue was to bring the system down for one hour.  _________________ Glenn |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jun 05, 2009 12:03 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
gbaddeley wrote: |
I have actually encountered this scenario! |
Never a trout when you need one eh?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|