Reputation: 13
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 .
Upvotes: 0
Views: 1462
Reputation: 33413
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>
Upvotes: 1