RabbitMQ Queue Flow Limit with Flow Control

If I declare a queue with x-max-length, all messages will be deleted or dead letters after reaching the limit.

I am wondering if, instead of discarded or dead letters, RabbitMQ can activate a flow control mechanism such as Memory / Disk watermarks . The reason is that I want to keep the message order (when serving, FIFO behavior) and it would be a much more convenient slowdown for manufacturers.

0
source share
2 answers

Try to implement application-level queue length limits. Let's say increase / decrease the Redis key and check its maximum value. It may not be as accurate as RabbitMQ's own mechanism, but it works fine in a separate queue / exchange, without affecting others in one broker.

PS In addition, in some tasks RabbitMQ is not the best choice, and old-school relational databases (MySQL, PostgreSQL or whatever you like) work best, but RabbitMQ can still be used as a bus event.

0
source

There are two open issues related to this topic on rabbitmq-server github repo . I recommended expressing your interest:

Block publishers when queue limit is reached

Nack, - ,

0

All Articles