Integration / RabbitMQ Interview Questions
What happens when a queue has no consumers?
If a queue has no active consumers, messages simply keep accumulating in it - they are not lost, as long as the queue itself still exists.
What happens next depends on the queue's configuration:
- A normal durable queue just grows, consuming more memory and disk over time.
- An
auto-deletequeue is only removed once it has had at least one consumer that later disconnects - a queue that never had a consumer is not auto-deleted. - If
x-max-lengthor a similar limit is set, older messages start getting dropped or dead-lettered once the limit is reached. - If
x-message-ttlis set, individual messages expire and are removed or dead-lettered after their TTL passes.
Unbounded growth with no consumers is a common cause of the memory/disk alarms that trigger RabbitMQ's flow control.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
