Integration / ActiveMQ Interview Questions Intermediate
What happens when a consumer fails to acknowledge a message?
If a consumer disconnects, crashes, or times out without sending an acknowledgment (in CLIENT_ACKNOWLEDGE or transacted mode), ActiveMQ treats the message as still pending and redelivers it - either to the same consumer on reconnect or to another available consumer on the same queue.
Each redelivery increments a counter tracked in the message's JMSXDeliveryCount property. Once that counter exceeds the redelivery policy's maximumRedeliveries (default 6), the broker stops retrying and routes the message to the Dead Letter Queue instead of looping forever. This protects the system from a single poison message endlessly blocking a queue while still giving transient failures, like a brief network blip or a slow database call, a chance to succeed on retry.
The exact redelivery delay is also configurable, typically starting small and increasing with an exponential back-off, so a consumer experiencing a brief hiccup gets a quick retry while one stuck in a longer outage doesn't get hammered with immediate redeliveries every few milliseconds.
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...
