Hello All,
Problem: Getting an error when connecting to 2 different subscriptions with the same name across 2 different topics.
Details:
I have a Controller in a Springboot app connecting to an Azure Service Bus using JMSListeners.
Method 1:
@JmsListener(destination = "${topicX}", containerFactory = "topicJmsListenerContainerFactory",
subscription = "${XXX}")
Method 2:
@JmsListener(destination = "${topicY}", containerFactory = "topicJmsListenerContainerFactory",
subscription = "${XXX}")
As you can see, the topic names are different, but subscription name is the same.
I get an error in the Springboot app as it's starting up.
Here's the error:
Caused by: javax.jms.JMSRuntimeException: A non-shared durable subscription is already active with name 'XXX'.
I've tried by commenting out 1 of the methods and confirmed it's working, and also tried to connect to a different subscription name and confirmed that that works too. It's just when I have 2 subscriptions with the same name across topics that I get the error above.
Thank you so much!
Edit: 23/01/23 ----- I'm still stuck with this. I haven't found much documentation around this either. Most of the online documentation talk about connecting to different subscriptions with different names, so I haven't come across anything similar to my problem. I don't know at this point whether this is in fact possible or it's a limitation of how JMS works?