I have a RabbitMQ queues for documents generation. Basically, each document has type
and state
(new, processing, ready), so I use topic exchange with r
You can check this plugin I wrote which allows to de-duplicate messages published within the broker.
You can de-duplicate on the exchange or at the queue according to your needs. Only thing your publisher needs to do is to set the x-deduplicate-message
message header with the ID
of your message.
As you wrote, ActiveMQ has "duplicate message detection", but it works differently. It does not remove old message from the queue but it does not add new message to it instead. So it works the same as plugin for RabbitMQ.
Ok, i've read about RabbitMQ inner architecture and find out it's impossible. So the way around for somebody looking for it.
ID
in message bodyID
value is timestamp of last worker run for this ID
.