[rabbitmq-discuss] Is DeliveryTag unique for every rabbitmq message?

Michael Klishin mklishin at gopivotal.com
Mon Jun 16 03:55:02 BST 2014



On 16 June 2014 at 06:44:33, DeepNightTwo (deepnighttwo at gmail.com) wrote:
> > The system stores rabbitmq messages into MySQL table. Is DeliveryTag  
> unique
> for every message? If so , it can be used as Primary Key for the table.  
> DeliveryTag is retrieved by "long ackId =
> delivery.getEnvelope().getDeliveryTag();"

delivery tags are scoped by channel. If a channel with id = N is closed
and then opened again, it is considered to be a completely new channel.

So no, you cannot use delivery tags to identify messages, you apps need
to generate identifiers instead. 
--  
MK  

Software Engineer, Pivotal/RabbitMQ


More information about the rabbitmq-discuss mailing list