Hi, iam new to camel,Im trying to implement a synchronous request-reply
mechanism using camel component.
I have 2  wmq queues 
*1. requestQuee - application will send requests to this queue
2. responseQueue  - application will have to listen & receive response from
this queue *


    /   <route id="jms-sync-route">
                     <camel:from uri="direct:jms" />
                     <camel:to
uri="jms:queue:requestQuee?replyTo=queue:responseQueue&amp;exchangePattern=InOut"
/>
              </route> /


     /  <camel:route id="mockresponse">
              <camel:from
uri="jms:queue:requestQuee?concurrentConsumers=5"/>
              <camel:process ref="jmsResponseListener" />
              <camel:to uri="jms:queue:responseQueue"/>
       </camel:route>/


bean jmsResponseListener having logic
public class MockResponseGenerator implements Processor{
/
        public void process(Exchange ex) throws Exception {
                ex.getIn().setBody("<res>mockresponse</res>");
                String msgid=(String) ex.getIn().getHeader("JMSMessageID");
                if(msgid != null){
                        ex.getIn().setHeader("JMSCorrelationID",msgid);
                        
                }
        }

}/

*I getting error as follows,it is observed that. message is en queued to
requestQuee , but not de queued.*


/Caused by: org.apache.camel.ExchangeTimedOutException: The OUT message was
not received within: 20000 millis due reply message with correlationID:
Camel-ID-ICB1864-58611-1463553066644-3-9 not received on destination:
queue://responseQueue. Exchange[ID-ICB1864-58611-1463553066644-3-8][Message:
<?xml version="1.0" encoding="UTF-8"?></

*If i remove inout pattern.message is en queued to requestQuee and after
dequeed by mockresponse route ,eventually MockResponseGenerator  prepares
mock response and enqueued to responseQueue.*

Please update your suggestions to achieve the same. Thanks :)



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-jms-In-Out-Pattern-tp5782730.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to