Hello, On Mon, Oct 12, 2015 at 4:40 PM, dermoritz <tantea...@hotmail.com> wrote: > My route looks like this > > from( trigger ) > .routePolicy( new FinishNotifier( onFinsh ) ) > .to( in ).split().body() > .streaming() > .process( aggregationHeaderProcessor ) > .aggregate( header( AggregationHeaderProcessor.ORDER_ID_HEADER > ), packAggregator ) > .completionSize( header( > AggregationHeaderProcessor.PACK_COUNT_HEADER ) ) > .executorService( Executors.newFixedThreadPool( > validationThreads ) ) > .log( LoggingLevel.TRACE, "Processing order # > ${property.CamelSplitSize}" ) > .process( validationProcessor ) > .process( statusCounterProcessor ) > .process( statisticsProcessor ) > .process( validationResultProcessor ) > .to( out ) > .routeId( ROUTE_ID ); > > FinishNotifier only implements "onExchangeDone". My problem is that this is > called right after aggregation has completed. But i want that complete route > has finished when exchange is done. The route worked fine without the 3 > lines for aggregation (process(), aggregate(), completionSize). So i suspect > the aggregator to mark the exchange as done. > So is there a way to unmark or prevent the too early call of > onExchangeIsDone ? >
I don't know any way of doing that. But instead, have you tried using onCompletion instead of the RoutePolicy? http://camel.apache.org/oncompletion.html from("direct:start") .onCompletion() .process(exchange -> { // do something }) .end() .to(in).split() ... etc > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/When-original-exchange-isDone-with-aggregator-tp5772577.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Kind regards Joakim Bjørnstad