What is the advantage of having both a client id and a subscriber name in the case of durable subscriber.
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).
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.
A durable subscriber is a message consumer that receives all messages published on a topic, including messages published while the subscriber is inactive.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With