Hi all I am using a Splitter and an Aggregator. All of the output are written into the final result. But at the end of the Split, I wanted to add something more. This is where the 'onCompletion' method inside the Aggregator can be used (in my mind, cause that works for scenarios without a Splitter).
But if have the 'onCompletion' method, then the Aggregator does not finish his job (cause it probably doesn't know when to stop) If I have no 'onCompletion' method, then the Aggregator does finish his job and the route does go on My question is: Why I cannot use the onCompletion method on the Aggregator. Cause that Aggregator does the start work and should also do the end work of the aggregation. I have used the Aggregator in other scenarios (without the Splitter), and there it worked smoothly Route where it does work, but I needed to call a bean after the end of the Splitter. from("direct:anything") .to("direct:getSomething") .split(simple("${body}"), new EdiInterchangeAggregator()) // For each document .to("direct:prepareSomething") .to("direct:createSomethingMore") .end() .log("CamelSplitSize: ${exchangeProperty.CamelSplitSize} documents") .bean(EDIFinalizer.class, "finalizeInterchange"); So what I want is to implement the onCompletion method on the class EdiInterchangeAggregator. Is this really not possible? Regards Reto