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 » Are message ids unique across queue managers. ?

Post new topic  Reply to topic
 Are message ids unique across queue managers. ? « View previous topic :: View next topic » 
Author Message
mehedi
PostPosted: Wed May 27, 2009 12:46 pm    Post subject: Are message ids unique across queue managers. ? Reply with quote

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
View user's profile Send private message MSN Messenger
Vitor
PostPosted: Wed May 27, 2009 12:58 pm    Post subject: Re: Are message ids unique across queue managers. ? Reply with quote

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
View user's profile Send private message
HubertKleinmanns
PostPosted: Thu Jun 04, 2009 12:04 am    Post subject: Re: Are message ids unique across queue managers. ? Reply with quote

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
View user's profile Send private message Visit poster's website
PeterPotkay
PostPosted: Thu Jun 04, 2009 5:23 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Jun 04, 2009 5:30 am    Post subject: Reply with quote

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
View user's profile Send private message
PeterPotkay
PostPosted: Thu Jun 04, 2009 5:41 am    Post subject: Reply with quote

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
View user's profile Send private message
gbaddeley
PostPosted: Thu Jun 04, 2009 4:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Jun 05, 2009 12:03 am    Post subject: Reply with quote

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
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 » Are message ids unique across queue managers. ?
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.