Make DefaultMessageListenerContainer with subscriptionShared and subscriptionDurable

核能气质少年 提交于 2020-05-15 20:57:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!