camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashwin Karpe <>
Subject Re: Using Asynchronous Processors -- a little help
Date Sat, 02 Oct 2010 00:08:09 GMT


There are several issues in your route definition & usage.

1> I am not sure what the first route  
     is doing for you.

2>Looking at your 2nd route segment, you are sending a request to a JMS
consumer (jms:queue:a.test).
The problem is that the JMS Consumer is taking the request as InOnly since a
"replyTo" parameter has not been set on the Consumer. Any response that this
Consumer needs to send back has to have a reply destination to send the
response back.

3> Not sure what you are attempting with an Async Processor. An Async
Processor is meant primarily to behave like a producer that sends an
exchange with a callback along the route. Since a callback has been
associated with the exchange and set to the next route element, the Async
Processor thread can effectively go away. When the next route element
receives the exchange or message and does its job (maybe calls other
processors synchronously) it expects to receive an modified exchange with a
done status back. When it does, it invokes the callback provided by the
AsyncProcessor, at which point, a new AsyncProcessor thread is created and
the message then can be handled and sent back. Is it were a synchronous
request, the AsyncProcessor thread would have to be in Thread_WAIT.
Hence it is more efficient thread-wise in situations where responses may
arrive after a long duration.

Check out the following links for code samples how to do this and how things

Hope this clarifies things.



Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary) 

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message