sajjad jafari
sajjad jafari

Reputation: 236

Make DefaultMessageListenerContainer with subscriptionShared and subscriptionDurable

I want to use subscriptionShared and subscriptionDurable in DefaultMessageListenerContainer due to having a shared durable subscription between all consumers.

After Tomcat start I see this log message many times and it seems my topic has a problem:

Setup of JMS message listener invoker failed for destination x.y.z trying to recover. cause:org.apache.activemq.ActiveMQSession.createSharedDurableConsumer (Ljavax/jms/Topic;Ljava/lang/String;)Ljavax/jms/MessageConsumer"

My Spring version is 4.3.8. I use ActiveMQ Artemis 2.9.0 and JMS 2.0.

Upvotes: 1

Views: 557

Answers (1)

Justin Bertram
Justin Bertram

Reputation: 34998

Based on the fact that the error message contains org.apache.activemq.ActiveMQSession it appears to me that you're using the OpenWire JMS client from ActiveMQ 5.x. This JMS client doesn't support JMS 2.0 and therefore doesn't support shared durable subscriptions. You need to use the JMS client from ActiveMQ Artemis.

Upvotes: 4

Related Questions