问题
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
.
回答1:
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.
来源:https://stackoverflow.com/questions/57248768/make-defaultmessagelistenercontainer-with-subscriptionshared-and-subscriptiondur