Announcement Announcement Module
No announcement yet.
MDP receives only 1 message but should receive 2 messages Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • MDP receives only 1 message but should receive 2 messages

    I have written a unit test to test request/response messages from Websphere MQ.
    When i send the message/request to MQ, I am suppose to get 2 responses/messages back on my listener MDP, but I am just getting only 1 resposne.
    The listener is running in spring container for the duration of my testcase runtime. Once test finishes, the listener stops since I am loading spring context through test.
    For my purpose, I am doing thread sleep in unit test once I send the request. The listener listens for messages/responses when my test thread in sleeping.
    The spring config for container is as follows:

    <bean id="destinationResolver"
    class=" .JndiDestinationResolver">
    <property name="jndiTemplate" ref="jndiTemplate" />
    <property name="cache" value="true" />
    <property name="fallbackToDynamicDestination" value="false" />

    <bean id="listener"
    class=" essageListener" />

    <bean id="jmsContainer"
    class="org.springframework.jms.listener.DefaultMes sageListenerContainer">
    <property name="connectionFactory" ref="spqrConnectionFactory" />
    <property name="destinationResolver" ref="destinationResolver" />
    <property name="concurrentConsumers" value="1" />
    <property name="destinationName" value="jms/recvQ" />
    <property name="messageListener" ref="listener" />

    Any suggestions on Why I am getting only 1 response ?