Re: Asynchronous processing of routes

2014-01-07 Thread Henryk Konsek
> Correct me if I am wrong. Camel will correlate the response if the other > service sends back the response with the same correlation ID as was sent to > it in the Request. > In our case, the other services are third-party C++ services which work > directly with MQ and do not use Camel. Reply cor

Re: Asynchronous processing of routes

2014-01-05 Thread yashgt
Correct me if I am wrong. Camel will correlate the response if the other service sends back the response with the same correlation ID as was sent to it in the Request. If the other service is not using Camel and is solely reading messages directly from MQ, it will not have the knowledge of where to

Re: Asynchronous processing of routes

2014-01-05 Thread yashgt
In my case, there may be multiple routes running in parallel. But I do not want to have multiple instances of the same route. All I need is a way by which a route will stop midway and wait for a MQ message to arrive as a response. I know from your responses that this is possible if the responder f

Re: Asynchronous processing of routes

2014-01-05 Thread Claus Ibsen
Just enable asyncConsumer=true søndag den 5. januar 2014 skrev kraythe . : > The interesting thing is that you don't have to do synchronous request > reply to have a route processing flow with a defined order. Consider a > route like the following: > > > from("jms:queue:input").to("jms:queue:proc

Re: Asynchronous processing of routes

2014-01-05 Thread kraythe .
The interesting thing is that you don't have to do synchronous request reply to have a route processing flow with a defined order. Consider a route like the following: from("jms:queue:input").to("jms:queue:processA").to("jms:queue:processB").to("jms:queue:results") And the helper routes: from("j

Re: Asynchronous processing of routes

2014-01-05 Thread Claus Ibsen
Hi If you do request/reply over JMS in a Camel route then it correlates and waits for the expected reply message. So you can do from X to jms foo ? replyTo = bar to Z Where the jms endpoint is doing request/reply over JMS And you can have multiple routes doing request/reply over JMS as wel

Re: Asynchronous processing of routes

2014-01-04 Thread yashgt
Perhaps my post was not clear enough... Route 1 send M1 to the target service over MQ1 and waits for the target to respond back with message M2 on MQ2. Now, like Route1, there are many other routes that expect different messages. RouteX expects MX to come on MQ2. RouteY expects MY to come on MQ2

Re: Asynchronous processing of routes

2014-01-03 Thread Henryk Konsek
Hi Yash, Solution to your problem is probably easier than you think. Using aggregator [1] EIP should solve your issue. from("jms:Q1").bean(SomeProcessorBean.class).to("jms:Q2"); from("Q2"). aggregate().constant(true).completionPredicate(body().isEqualTo("M2")).groupExchanges(). to("Q3"); Ag

Re: Asynchronous processing of routes

2014-01-02 Thread kraythe .
Try splitting up routes more and using ActiveMQ or another broker in between the routes. So instead of "waiting for the message to arrive" consume the message with a route and resume programming perhaps enriching with other messages from other sources. You can also create an aggregation strategy th

Re: Asynchronous processing of routes

2014-01-02 Thread Richard Kettelerij
>> Step 2 implies that the message coming on Q2 needs to be inspected and only if it turns out to be M2. I think the Content-Based Router EIP is a good fit here, http://camel.apache.org/content-based-router.html. For example: from("jms:q2") .choice().when(body().isInstanceOf(M2.class))