Integration / RabbitMQ Interview Questions
How do you troubleshoot unacknowledged message buildup in RabbitMQ?
A growing "unacked" count on a queue means messages have been delivered to consumers but never confirmed, which ties up memory and, at high prefetch, can eventually trigger flow control.
- Check consumer health first - is the process alive, is it stuck in a long-running operation, or did it crash without the broker noticing yet (connection still technically open)?
- Review the code path for missing acks - a common bug is acking only on the success path and forgetting to ack/nack on exceptions, so failed messages never get resolved either way.
- Check prefetch
- Use consumer_timeout (RabbitMQ 3.8+, enabled by default) which forces the channel closed if a consumer holds a message unacked for too long, automatically requeuing it instead of letting it hang forever.
- Confirm via the management UI - the per-queue and per-channel "unacked" counters make it easy to see which consumer is the source of the backlog.
The fix is almost always either a code bug around the ack/nack path, a stuck downstream dependency slowing the consumer, or a prefetch value that is too generous for the workload.
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...
