camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <ch0...@gmail.com>
Subject Re: inOnly and original MEP
Date Mon, 26 Nov 2012 08:33:21 GMT
Maxence,

The In object is only used in an InOnly exchange and Out when a response
must be propagated back to the from() component. If you would like that
your route exposed behind the endpoint "direct:eventRoute" or "seda:eventRoute"
return a response, then you should define the setExchangePattern as InOut (
http://camel.apache.org/exchange-pattern.html)

Regards,




On Mon, Nov 26, 2012 at 9:17 AM, maxence.dewil <the.maxxxx@gmail.com> wrote:

> Hi,
>
> I need some clarification for inOnly(String uri): the documentation states
> ''Notice the existing MEP is restored after the message has been sent to
> the
> given endpoint."
>
> However with the route below, I loose my original 'Input' object:
>
> from("direct:myRoute")
> .process(new Processor() {
>     public void process(Exchange exchange) throws Exception {
>         exchange.getIn().setBody(new Input()));
>     }
> })
> .inOnly("direct:eventRoute")
>
> And if I change the route to this:
>
> from("direct:myRoute")
> .process(new Processor() {
>     public void process(Exchange exchange) throws Exception {
>         exchange.getIn().setBody(new Input()));
>     }
> })
> .inOnly("seda:eventRoute")
>
> Then my 'Input' object is available in exchange.getOut().getBody()
>
> Thank
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/inOnly-and-original-MEP-tp5723219.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com

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