camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: Camel JMS Request Reply
Date Sun, 30 Sep 2012 09:58:07 GMT
Can you try:

from("activemq:queue:EVENTS")
    .multicast(new Aggregation())
        .inOut("activemq:queue:Test1", "bean:getDummyString");

from("activemq:queue:Test1?exchangePattern")
    .process(new Processor() {
        public void process(Exchange exchange) throws Exception {
            exchange.getIn().setBody("Changed the exchange hello world");
        }});

By using the inOut MEP in JMS, Camel will create by default a temp. Queue
for the response. This is the recommended and fasted approach.
And read this FAQ about using getIn() or getOut():
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

Best,
Christian

On Sat, Sep 29, 2012 at 10:24 PM, ravi.4indra <ravi.4indra@gmail.com> wrote:

> Hi ,
>
> I need some help with camel JMS Request reply (InOUT)
>
> I want my aggregation method to generate new exchange from replyMessage(it
> is the meesage in replyto Queue/response for my request message) and a
> dummy
> bean which returns a object.
>
> can the aggregationStartegy get the message from replyTo Queue?. Is there a
> way to force the camel to return the message from replytoQueue.
> Any Help is appreciated.
>
> Thanks
> Ravi
> below is the code i am tryiing
>
> public void configure() throws Exception {
>
> from("activemq:queue:EVENTS").multicast(new
>
> Aggregation()).to("activemq:queue:Test1?replyTo=queue:Test3&exchangePattern=InOut&replyToType=Exclusive","bean:getDummyString");
>
> from("activemq:queue:Test1?exchangePattern").process(
>                         new Processor() {
>                          public void process(Exchange exchange) throws
> Exception {
>                                  exchange.getOut().setBody("Changed the
> exchange hello
> world");
>                          }
> }).to("activemq:queue:Test3");
>
> }
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-JMS-Request-Reply-tp5720247.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--

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