Tuesday, September 3, 2019

Durable vs Non-Durable

There is no concept of a topic being durable or a non durable. It is the subscription for a topic that can be durable or non durable.

Non durable subscription:
A non durable subscription means that publication will be delivered to the subscriber application as long as it is up and running. Once the application terminates, the broker will remove the subscription and no more publications will be delivered to that subscriber.

Durable Subscription:
On the other hand, for a durable subscription, publications will be delivered to the subscription even if the subscriber application is not running. Broker will hold such publications (in a queue) when the application is down. Once the application comes up, those publications will be delivered.

Durable subscriptions provide increased reliability at the cost of slower throughput for the following reasons:
The Message Queue message broker must persistently store the list of messages assigned to each durable subscription so that should the broker fail, the list is available after recovery.
Persistent messages for durable subscriptions are stored persistently, so that should a broker fail, the messages can still be delivered after recovery, when the corresponding consumer becomes active.
 By contrast, persistent messages for non-durable subscriptions are not stored persistently (should a broker fail, the corresponding consumer connection is lost and the message would never be delivered).


No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...