message id from the consumer header

121 views
Skip to first unread message

Nabeel Ahmed M

unread,
Mar 13, 2019, 2:23:43 AM3/13/19
to rabbitmq-users
Can i get the message id from the consumer header with the delivery tag?
and i think message id is set automatically when the consumer reads or consumes the message. 

Luke Bakken

unread,
Mar 13, 2019, 1:11:43 PM3/13/19
to rabbitmq-users
Hi Nabeel,

I am assuming that you are using the Pika library. You use the BasicProperties class when publishing a message and an instance of this class is available when a message is consumed. The message_id field will contain the information, but please note it is up to your applications to set a value when published.

Again, the Pika repository has examples of this. For instance, here:


Thanks,
Luke
Reply all
Reply to author
Forward
0 new messages