Integration / ActiveMQ Interview Questions Intermediate
How do you configure a Dead Letter Queue policy?
Redelivery attempts and DLQ routing are configured together in activemq.xml:
<redeliveryPolicy maximumRedeliveries="3" initialRedeliveryDelay="1000" backOffMultiplier="2" useExponentialBackOff="true"/> <deadLetterStrategy> <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true"/> </deadLetterStrategy>
maximumRedeliveries controls how many attempts happen before a message is considered undeliverable. individualDeadLetterStrategy routes each source destination to its own DLQ.<name> queue instead of one shared ActiveMQ.DLQ, making it much easier to trace which queue a failed message originally came from.
Redelivery delay grows with each attempt when useExponentialBackOff is enabled, starting at initialRedeliveryDelay and multiplying by backOffMultiplier on every retry, up to an optional maximumRedeliveryDelay ceiling. This spacing gives transient issues, like a brief database outage, more time to resolve between attempts instead of hammering the same failing operation immediately. Once individualDeadLetterStrategy is enabled, an operator can look directly at a queue like DLQ.OrdersQueue to know exactly which upstream destination a poisoned message originated from, rather than digging through one shared ActiveMQ.DLQ full of unrelated messages from every queue on the broker.
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...
