Hi Thomas,

camel does the receive as well as the reply in the from("jms:queue:myQ").

So what you try to achieve can simply be done with:

from("jms:queue:MyQ")...

Simply start your listener route with this and do some processing on the route. 
The body that is set at the end of the route is then automatically sent to the 
requestor.
See http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

For the requestor a simple to("jms:queue:MyQ") at the end of the route will 
send the message as well as receive the reply.

Christian




On 29.05.2014 09:15, Tomas wrote:
Hi guys,
I am pretty new in Camel... I'd like to implement a simple Request/reply for
messaging with this behavior:

1. Requestor sends a message to a queue
2. Replier listens on the queue, gets asynchronously the message and replies
to JMSReplyTo header of the message
3. Requestor receives the reply

I've got this code:

from("jms:queue:MyQ").setExchangePattern(ExchangePattern.InOut).to("jms:queue:MyQ");

1. and 2. works fine, the requestor sends the msg to MyQ (without any
setting of the headers on the app level), and the repliers gets the msg from
MyQ with set JMSCorrelationID and JMSReplyTo by Camel.

The problem is that JMSReplyTo is not know to the requestor, so it cannot
wait on the temp queue for the reply...

Is there a solution?

Thank you



--
View this message in context: 
http://camel.465427.n5.nabble.com/Request-reply-JMS-ActiveMQ-tp5751686.html
Sent from the Camel - Users mailing list archive at Nabble.com.


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to