Integration / ActiveMQ Interview Questions Intermediate
When should you use a Durable Subscriber over a plain consumer?
Use a durable subscriber when the receiver is a Topic subscriber that must never miss messages published while it's offline - for example, an audit trail, a billing reconciliation job, or a cache-warming service that must reflect every event even after a restart or network blip.
A plain, non-durable topic subscriber only gets what's published while it's actively connected, so any gap in connectivity means a permanent gap in its view of the stream. The trade-off is that the broker must retain unacknowledged messages for a durable subscriber indefinitely, or until a configured expiry, consuming storage even while the subscriber is offline. That's why it isn't the default choice for every topic consumer - only for ones where completeness matters more than storage overhead.
It's worth contrasting this with Virtual Topics, which achieve similar no-message-loss guarantees for multiple consumer groups without the per-client durable subscription bookkeeping - durable subscribers remain the right tool specifically when you need classic JMS topic semantics, such as selectors scoped to one named subscription.
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...
