camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quinn Stevenson <qu...@pronoia-solutions.com>
Subject Re: Camel jms - In Out Pattern
Date Wed, 18 May 2016 15:41:47 GMT
It looks like the other system isn’t setting the JMSCorrelationID, so the route is timing-out
waiting for a response with that correlation ID.

Have you tried setting replyToType=Exclusive?  You can see the details in the camel-jms docs
(http://camel.apache.org/jms.html <http://camel.apache.org/jms.html>).

> On May 18, 2016, at 1:16 AM, Adarsh_GU <adarsh.unnithan@ibsplc.com> wrote:
> 
> 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.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message