Show TOC Anfang des Inhaltsbereichs

Diese Grafik wird im zugehörigen Text erklärt Managing Durable Subscriptions Dokument im Navigationsbaum lokalisieren

Use

When the message producer is no longer active, messages that were sent can be lost. If you create a durable subscriber, the message will not be lost in such a case.

Diese Grafik wird im zugehörigen Text erklärt

Using durable subscriptions may lead to higher overheads. A durable subscription can have only one active subscriber at a time.

Procedure

...

       1.      Create a durable subscription:

Syntax

// ...

Topic topic;

String subscription_name = "my_sub";

// ...

TopicSubscriber topicSubscriber = topicSession.

   createDurableSubscriber(topic, subscription_name);

       2.      Stop the durable subscription:

Syntax

topicSubscriber.close();

       3.      Delete the durable subscription. Unsubscribe the subscription name:

Syntax

topicSession.unsubscribe(subscription_name);

 

 

Ende des Inhaltsbereichs