DefaultMessageListenerContainer 无法与 Websphere MQ 一起使用
我正在使用 spring 2.5.6 和 spring-integration 1.0.3 以及 MQ 客户端 6.0.2.2
我必须向消息驱动通道适配器添加消息选择器,但现在出现以下错误:
MQJMS2008:打开MQ队列失败;嵌套异常是 com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2085
当我使用 ActiveMQ 作为测试工具时它可以工作。
我的配置:
<jms:message-driven-channel-adapter
id="jmsIn"
channel="inboundMessage"
container="myContainer"/>
<bean id="myContainer"
class="org.springframework.jms.listener.DefaultMessageListenerContainer">
<property name="connectionFactory" ref="connectionFactory"/>
<property name="destinationName" value="myQueue"/>
<property name="messageSelector" ref="messageSelector"/>
<property name="transactionManager" ref="txManager"/>
</bean>
如果我恢复到以前的配置,一切都很好(除了我没有消息选择器!)
<jms:message-driven-channel-adapter
id="jmsIn"
destination="tradeQueue"
channel="inboundMessage"
transaction-manager="txManager"/>
I am using spring 2.5.6 and spring-integration 1.0.3 and MQ client 6.0.2.2
I have had to add a message selector to my message-driven-channel-adapter, but now I am getting the following error:
MQJMS2008: failed to open MQ queue ; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2085
It works when I used ActiveMQ as a test harness.
My configuration:
<jms:message-driven-channel-adapter
id="jmsIn"
channel="inboundMessage"
container="myContainer"/>
<bean id="myContainer"
class="org.springframework.jms.listener.DefaultMessageListenerContainer">
<property name="connectionFactory" ref="connectionFactory"/>
<property name="destinationName" value="myQueue"/>
<property name="messageSelector" ref="messageSelector"/>
<property name="transactionManager" ref="txManager"/>
</bean>
If I revert to my previous configuration it's all good (except I don't have a message selector!)
<jms:message-driven-channel-adapter
id="jmsIn"
destination="tradeQueue"
channel="inboundMessage"
transaction-manager="txManager"/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
啊!
在我所在的地方,
我应该让
斯卡夫曼是对的,队列实际上并不存在。
磷
Ah!
Where I had
I should have had
Skaffman was right, the queue didn't actually exist.
P