【问题标题】:DefaultMessageListenerContainer not working with Websphere MQDefaultMessageListenerContainer 不适用于 Websphere MQ
【发布时间】:2010-12-17 10:16:02
【问题描述】:

我正在使用 spring 2.5.6 和 spring-integration 1.0.3 和 MQ 客户端 6.0.2.2

我不得不向我的消息驱动通道适配器添加消息选择器,但现在我收到以下错误:

MQJMS2008: failed to open MQ queue ; nested exception is 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"/>

【问题讨论】:

  • 队列真的存在吗? ActiveMQ 按需创建队列,IBM MQ 不会。
  • 嗨 Skaffman,队列确实存在。如果我使用以下配置,它可以工作(没有消息选择器)。
  • “works”是指可以发送和接收消息吗?

标签: java spring jms ibm-mq spring-integration


【解决方案1】:

啊!

我在哪里

<property name="destinationName" value="myQueue"/>

我应该有的

<property name="destinationName" ref="myQueue"/>

斯卡夫曼是对的,队列实际上并不存在。

P

【讨论】:

    猜你喜欢
    • 2016-01-27
    • 1970-01-01
    • 2011-10-29
    • 2019-12-30
    • 1970-01-01
    • 2016-01-13
    • 1970-01-01
    • 2013-01-03
    • 1970-01-01
    相关资源
    最近更新 更多