Difference between Non-Durable and Durable Subscription

Non-Durable Subscription – In publish/subscribe messaging model of JMS, messages are retained in the Topic as long as either they are delivered to all the current/active subscribers or they are expired. This means that subscribers who have disconnected and are not listening actively, would not receive any messages published on the topic during the time they remain disconnected. Thus, in non-durable subscription any message published on the topic, when the subscriber was inactive would be lost.

Durable Subscription – There is an option in publish/subscribe model for subscribers to receive the messages that were published on the topic when they were disconnected or inactive. This is known as durable subscription.  When the subscriber is inactive, messages are persisted and delivered when the subscriber becomes active. Thus, durable subscription allows subscribers to dis-connect, re-connect again and fetch all the messages published on the topic when they were disconnected.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">