You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Neil Pritchard <Ne...@securetrading.com> on 2010/07/21 12:15:03 UTC

How is the Message ID compiled

Hi,

I'm using ActiveMQ as an exchange and consumer of messages to trigger a process that sends another message vi http post to a third parties system.  The third party requires that the messages that they receive carry a unique identifier.  My intention is to simply relay the Message ID to them but would like to check how the message ID is built up first and of course confirm that it is unique.  Would the MessgaeID be reset if the boroker (or network of brokers in this case) were restarted when empty.  For reference I'm using Kaha for persistence.

Many thanks for any help.

Neil


RE: How is the Message ID compiled

Posted by Neil Pritchard <Ne...@securetrading.com>.
Thanks for this.  I'll need to hash the MessageID before sending it out, just to hide the hostname, but otherwise global uniqueness is good.

I'm using kahaDB for persistence, certainly looks like nice feature.

Any Idea when 5.4 will be out, I'll need it to be stable before using it in production, but the delayed and scheduled resend is something that I will need in the future.

Thanks,

Neil

-----Original Message-----
From: Rob Davies [mailto:rajdavies@gmail.com] 
Sent: 21 July 2010 11:57
To: users@activemq.apache.org
Subject: Re: How is the Message ID compiled

Hi Neil,

KahaDB woud be a better bet - its the default in 5.4 (to be released really soon).
MessageId's are globally unique - and the seed is a combination if the host name + an operating system generated file descriptor id + a time stamp. Using this seed an incrementing long is used to complete the id.

cheers,

Rob

Rob Davies
follow me: http://twitter.com/rajdavies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I wrote this: http://www.manning.com/snyder/




On 21 Jul 2010, at 11:15, Neil Pritchard wrote:

> Hi,
> 
> I'm using ActiveMQ as an exchange and consumer of messages to trigger a process that sends another message vi http post to a third parties system.  The third party requires that the messages that they receive carry a unique identifier.  My intention is to simply relay the Message ID to them but would like to check how the message ID is built up first and of course confirm that it is unique.  Would the MessgaeID be reset if the boroker (or network of brokers in this case) were restarted when empty.  For reference I'm using Kaha for persistence.
> 
> Many thanks for any help.
> 
> Neil
> 


Re: How is the Message ID compiled

Posted by Rob Davies <ra...@gmail.com>.
Hi Neil,

KahaDB woud be a better bet - its the default in 5.4 (to be released really soon).
MessageId's are globally unique - and the seed is a combination if the host name + an operating system generated file descriptor id + a time stamp. Using this seed an incrementing long is used to complete the id.

cheers,

Rob

Rob Davies
follow me: http://twitter.com/rajdavies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I wrote this: http://www.manning.com/snyder/




On 21 Jul 2010, at 11:15, Neil Pritchard wrote:

> Hi,
> 
> I'm using ActiveMQ as an exchange and consumer of messages to trigger a process that sends another message vi http post to a third parties system.  The third party requires that the messages that they receive carry a unique identifier.  My intention is to simply relay the Message ID to them but would like to check how the message ID is built up first and of course confirm that it is unique.  Would the MessgaeID be reset if the boroker (or network of brokers in this case) were restarted when empty.  For reference I'm using Kaha for persistence.
> 
> Many thanks for any help.
> 
> Neil
>