spring - 使用 subscriptionShared 和 subscriptionDurable 制作 DefaultMessageListenerContainer
问题描述
由于在所有消费者之间共享持久订阅,我想使用subscriptionShared
and subscriptionDurable
in 。DefaultMessageListenerContainer
Tomcat 启动后,我多次看到此日志消息,似乎我的主题有问题:
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"
我的 Spring 版本是4.3.8
. 我使用 ActiveMQ Artemis2.9.0
和 JMS 2.0
。
解决方案
基于错误消息包含的事实,在org.apache.activemq.ActiveMQSession
我看来,您正在使用 ActiveMQ 5.x 中的 OpenWire JMS 客户端。此 JMS 客户端不支持 JMS 2.0,因此不支持共享持久订阅。您需要使用来自 ActiveMQ Artemis 的 JMS 客户端。
推荐阅读
- numpy - 在 Python 中使用 Numpy 进行填充
- linux - 什么是 lseek 的 linux 内核等价物?
- html - 如何使活动页面栏保持突出显示?
- javascript - 将 Flask 中的数据传递到单独的 Javascript 文件中
- angular - 如何检查使用的 Angular 版本
- android - Kotlin:JSONObject 可以解析自定义对象吗?
- python-3.x - 在 python 3.8 上安装 pyttsx3 时
- java - 两个类共享相同和相似但不同的方法的 Java 设计模式
- java - Java Cipher.getBlockSize() 抛出异常
- python - Python代码代码没有给出正确的结果