Show TOC Start of Content Area

This graphic is explained in the accompanying text Managing Durable Subscriptions  Locate the document in its SAP Library structure

Use

When a topic subscriber is not active, messages that were sent during its period of inactivity will not be delivered to it when it becomes active again. If you want to be sure you receive all messages published to a topic, no matter if your subscriber has been continuously active, you can create a durable subscriber.

This graphic is explained in the accompanying text

Using durable subscriptions may lead to higher processing overheads. Remember to unsubscribe your durable subscribers once you no longer need them. The JMS Provider keeps all the messages that durable subscribers have not yet consumed, so unneeded durable subscribers can waste a significant amount of resources and degrade JMS Provider performance.

Procedure

...

       1.      Create a durable subscription:

This graphic is explained in the accompanying text

...

Topic topic;

String subscription_name = "my_sub";

...

TopicSubscriber topicSubscriber = topicSession.createDurableSubscriber(topic, subscription_name);

       2.      Inactivate the durable subscription:

This graphic is explained in the accompanying text

topicSubscriber.close();

       3.      Delete the durable subscription and unsubscribe the subscription name:

This graphic is explained in the accompanying text

topicSession.unsubscribe(subscription_name);

 

 

End of Content Area