osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: understanding InOut


Hi

We have a page here with some details about IN vs OUT
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

On Fri, Dec 14, 2018 at 4:29 PM Peter Nagy (Jr) <pnagy@xxxxxxxxxx> wrote:
>
> I still don't quite grok how InOut works. When I set the exchange
> pattern to InOut, what exactly will happen? Will the *next*
> processor
> reply to the previous one? If so, how? If so, how does the
> previous
> processor act on the reply? Or is the InOut just about 1
> Processor? If
> so, can e.g. a Processor block until a split is reaggregated?
>
> I'm trying to find some documentation on this that would explain
> these
> details but I didn't find much. The request-reply page is brief
> and uses
> mocks.
>
> As a real world bonus - I'm running a mongodb aggregation pipeline
> splitting and streaming and would need to fire just 1 exchange
> further
> down the route when the whole aggregation is finished. I'm doing
>
>   .to("mongodb3://...")
>   .split(..).streaming()
>   ...
>   .aggregate(..)
>   .hereINeed1exchange;
>
> I recently found out that split can take an aggregator as
> argument,
> would that solve this case? How exactly does that work?
>
> --
> To reach a goal one has to enjoy the journey.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2