5

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

vmurthy
  • 71
  • 5

1 Answers1

4

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.

Shashi
  • 14,980
  • 2
  • 33
  • 52
  • @Shashi If I want to use shared subscription i.e. every consumer should get distinct messages. What would be the configuration? Should I have distinct clientId and same subscription name? I am facing problem in load-balancing the messages over multiple VMs. Here is my stackoverflow link to get clarifications: https://stackoverflow.com/questions/53672925/how-to-share-messages-published-on-topic-between-multiple-vms-in-spring-jms-t/53673156?noredirect=1#comment94226720_53673156 Can you please provide your input? – G.G. Dec 10 '18 at 03:25
  • I have added comments to https://stackoverflow.com/questions/53672925/how-to-share-messages-published-on-topic-between-multiple-vms-in-spring-jms-t/53673156?noredirect=1#comment94226720_53673156 – Shashi Dec 10 '18 at 03:54