You can use a predicate as completion critereria.

On Tue, Oct 6, 2015 at 1:57 PM, dermoritz <tantea...@hotmail.com> wrote:
> in my route i want to aggregate exchanges based on a header value (a
> processor extracts it from the body and sets the header)
>
> the route looks like this:
>
> from(direct).process(new SetCorrelationHeader).aggregate(header("id"), new
> CustomAggregator).completion<What to set here?>.to(mock)
>
> I want to aggregate all messages with same correlation key. How to achieve
> this? (i can't make any assumptions about time or size)
>
> Within the processor for each new group the oldExchange==null. So at the
> moment i know that the prevoius group is complete the old exchange is sent
> out already.
>
> So how to implement the completion in this case? Probably
> eagerCheckCompletion could help - but how?
>
> (i am using camel 2.14.3 - upgrading is no option)
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/aggreagator-completion-based-on-correlation-key-tp5772332.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition:
https://www.manning.com/books/camel-in-action-second-edition

Reply via email to