0
votes

In Mule Request-Reply pattern, JMS inbound endpoint is consuming all the messages in the queue. how can i avoid this behavior of mule. here is my flow

<request-reply timeout="100000">
        <jms:outbound-endpoint queue="request"
            connector-ref="Active_MQ" exchange-pattern="one-way" doc:name="JMS- REQUEST" disableTemporaryReplyToDestinations="false" >
            <message-properties-transformer>
                <delete-message-property key="MULE_REPLYTO"/>
            </message-properties-transformer>
        </jms:outbound-endpoint>
        <jms:inbound-endpoint queue="reply"
            connector-ref="Active_MQ" exchange-pattern="one-way" doc:name="JMS-REPLY"/ >

All the messages in 'reply' queue is consumed irrespective of Correlation Id. Any help is appreciated .

1

1 Answers

1
votes

Try using a selector on the JMS inbound endpoint:

<jms:inbound-endpoint queue="reply"
        connector-ref="Active_MQ" exchange-pattern="one-way"
        doc:name="JMS-REPLY"/ >
    <jms:selector expression="JMSCorrelationID=#[message.correlationId]"/>
</jms:inbound-endpoint>