Question

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"/>
Was it helpful?

Solution

Ah!

Where I had

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

I should have had

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

Skaffman was right, the queue didn't actually exist.

P

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top