Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does a jms durable subscriber need both a client id and a subscriber name?

Tags:

What is the advantage of having both a client id and a subscriber name in the case of durable subscriber.

like image 521
vmurthy Avatar asked Oct 14 '16 20:10

vmurthy


People also ask

What is durable subscriber in JMS?

A durable subscriber establishes a durable subscription with a unique identity on the JMS provider. A durable subscription allows subscribers to receive all the messages published on a topic, including those published while the subscriber is inactive (for example, if the JMS trigger is disabled).

What is JMS client ID?

Within the JMS transport, there is a attribute call ClientID. This is a property that is used specifically by a JMS Provider to identify the JMS connection from the client and allow it to become durable.

What is a durable subscriber?

A durable subscriber is a message consumer that receives all messages published on a topic, including messages published while the subscriber is inactive.

Which of the following options would you use to establish the unique identity of a durable subscriber in JMS?

If a durable subscription has no active subscriber, the JMS provider retains the subscription's messages until they are received by the subscription or until they expire. You establish the unique identity of a durable subscriber by setting the following: A client ID for the connection.


1 Answers

While client id identifies a JMS consumer, the subscription name identifies a subscription created by that consumer.

A client can have more than one durable subscription. A JMS provider uses both client id and subscription name to create an ID to uniquely identify each durable subscription from a client. Hence both client id and subscription name are required. This unique id is required for resuming a subscription for the given topic when the client reconnects.

like image 173
Shashi Avatar answered Sep 25 '22 16:09

Shashi