camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adarsh_GU <>
Subject Camel jms - In Out Pattern
Date Wed, 18 May 2016 07:16:40 GMT
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" />
              </route> /

     /  <camel:route id="mockresponse">
              <camel:process ref="jmsResponseListener" />
              <camel:to uri="jms:queue:responseQueue"/>

bean jmsResponseListener having logic
public class MockResponseGenerator implements Processor{
	public void process(Exchange ex) throws Exception {
		String msgid=(String) ex.getIn().getHeader("JMSMessageID");
		if(msgid != null){


*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:
Sent from the Camel - Users mailing list archive at

View raw message