I've a Mule(3.5) flow with JMS request-reply block. I saw that all the messages coming to reply queue get consumed automatically. I would like to process messages that come to jms reply queue. I've tried with jms:selector and jms requester module so far but no luck. Is there any way to achieve this?
Code:
<mule>
<flow name="main" doc:name="main">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" path="test" port="2000" doc:name="HTTP"/>
<logger message="starting main flow" level="INFO" doc:name="Logger"/>
<request-reply storePrefix="mainFlow">
<jms:outbound-endpoint queue="StudioIN" connector-ref="Active_MQ1" exchange-pattern="one-way"/>
<jms:inbound-endpoint queue="StudioOUT" connector-ref="Active_MQ1" exchange-pattern="one-way">
<property key="selector" value="JMSCorrelationID='#[message.correlationId]'"/>
</jms:inbound-endpoint>
</request-reply>
</flow>
<flow name="worker" doc:name="worker">
<jms:inbound-endpoint queue="StudioIN" connector-ref="Active_MQ1" doc:name="JMS"/>
<async doc:name="Async">
<logger message="starting worker task(s) .... Payload: #[payload], Request: #[message.inboundProperties['http.request']]" level="INFO" doc:name="Logger"/>
<scripting:component doc:name="thread-sleep(10s)">
<scripting:script engine="Groovy">
System.out.println "about to sleep @ time" + System.currentTimeMillis()
Thread.sleep(10000);
System.out.println "done sleeping @ time" + System.currentTimeMillis()
</scripting:script>
</scripting:component>
<logger message="finishing up worker task(s) ...." level="INFO" doc:name="Logger"/>
</async>
</flow>
</mule>
I would like to process whatever comes to reply queue StudioOUT. Is there any proper way to achieve this?