Can a RabbitMQ user configure the consumption of a certain number of attempts for the same message

Can RabbitMQ work in some way, I can determine my consumer that he has a limit on the consumption of the same message. those. my consumer makes a baseline deviation with enqueue = true. And he will endlessly continue to listen to the same message. I am not talking about TTL on the queue side. But control / configuration over the consumer, to say that I want to use this only 5 times, and then send it to another queue, for example. Can this be achieved?

+1
source share
2 answers

This can be done at the application level or through TTL and Dead letter exchanges . An unknown way of what you want on the broker's side (and I see no reason why you cannot do this on the consumer side)

PS: just make the comment more visible

The main idea is to create a custom ttl property (a-la hops count in TCP / IP packets) and reduce it every time a message is consumed (and re-publish the message body with new details). When it reaches zero - publish it in another queue.

+1
source

, , . , . , , , . ACK RabbitMQ , , ( ) .

+1

Source: https://habr.com/ru/post/1534440/


All Articles