Rabbitmq message arrival time stamp

2019-04-24 02:44发布

Is there a way to get the timestamp when a message was placed on the queue, from a consumer. Not when it was published, but when it actually made it to the queue.

标签: c# rabbitmq amqp
2条回答
干净又极端
2楼-- · 2019-04-24 03:00

A duplicate question has a good answer https://stackoverflow.com/a/33640262/1689049:

As of 2015, there are new answers for the original question.

This plugin will do exactly what you were looking for.

Take in mind there will be some minimal overhead since it will hook all messages being queued.

查看更多
beautiful°
3楼-- · 2019-04-24 03:04

No there's no way to figure this out, unless, as you state yourself you write a plugin for this. There is nothing in the AMQP specification that says that the message must know when it arrived in the queue.

There is no need from the AMQP point of view to know this. There are also many cases when the message might pass through several queues and then which queue should represent the relevant timestamp?

查看更多
登录 后发表回答