Is it possible to configure the broker to insert a timestamp header if it is missing in the message? So if the publishing client does not add the timestamp header, can the broker insert it with a timestamp value matching the moment the message was received by the exchange? Where should I look for that configuration? Or is that a bad idea?
相关问题
- mySQL alter table on update, current timestamp
- Error message 'No handlers could be found for
- How to convert from Timestamp to Mongo ObjectID
- Calculate sum time in Oracle
- php convert a date to a timestamp
相关文章
- RabbitMQ with Unity IOC Container in .NET
- Install rabbitmqadmin on linux
- PostgreSQL update time zone offset
- How can i insert timestamp with timezone in postgr
- SQL- Difference between TIMESTAMP, DATE AND TIMEST
- Convert timestamp to hours and minutes for a movie
- Timestamp based sync, how to reduce the mobile dat
- Spring AMQP single consumer parallelism with prefe
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.
So to answer your question, no there is no way to configure the broker to insert a timestamp. Nothing the in AMQP specification requires a message to know when it arrives at the broker and keep in mind that manually inserting the timestamp on the broker side will only represent when the message was received by the broker, not when it was published.
If you are hell-bent on doing this you could write your own RabbitMQ plugin to do this but I would not recommend doing this. Instead I would recommend forcing your producers to include the timestamp in their message properties.
Resources:
RabbitMQ Message Arrival Timestamp
RabbitMQ AMQP.BasicProperties Java API