You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by mgiammarco <mg...@gmail.com> on 2012/01/05 00:08:10 UTC

Re: Please explain better in-out

Ok probably I have explained myself wrong. I need that camel consumes
messages from the outside. I am testing it with:

from("activemq:queryServer?exchangePattern=InOut")
				.to("log:it.giammar.pratobackend?showHeaders=true")
				.to("bean:saluta");

But if I do not add another .to("activemq:myReplyQueue");

nothing comes back. 

--
View this message in context: http://camel.465427.n5.nabble.com/Please-explain-better-in-out-tp5106204p5121209.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Please explain better in-out

Posted by Hadrian Zbarcea <hz...@gmail.com>.
Hi,

What you are looking for is a common use case supported by Camel. What 
you need to do is use the 'replyTo' parameter in your activemq uri [1], 
insead of the extra 'activemq:myReplyQueue' at the end of the route you 
mentioned. That will tell the activemq consumer to take the message 
resulted from processing and put it in the reply queue (and use a 
correlation id as mentioned by Willem), which is what you want.

One other thing to consider (independent of solution above) is using 
just camel-jms and plain "jms:..." uris.

Cheers,
Hadrian

http://camel.apache.org/jms.html



On 01/04/2012 06:08 PM, mgiammarco wrote:
> Ok probably I have explained myself wrong. I need that camel consumes
> messages from the outside. I am testing it with:
>
> from("activemq:queryServer?exchangePattern=InOut")
> 				.to("log:it.giammar.pratobackend?showHeaders=true")
> 				.to("bean:saluta");
>
> But if I do not add another .to("activemq:myReplyQueue");
>
> nothing comes back.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Please-explain-better-in-out-tp5106204p5121209.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

-- 
Hadrian Zbarcea
Principal Software Architect
Talend, Inc
http://coders.talend.com/
http://camelbot.blogspot.com/