Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.21.2
-
None
Description
Using splitters with the UseOriginalAggregationStrategy in a loop causes the splitter to return always the same original exchange.
// my code is similar to the following one: from("direct:myLoop") .loop(simple("{{export.maxLoopsPerRun}}")) .setHeader(...) // changing header fields .split(body(), new UseOriginalAggregationStrategy(null, false)) .to("direct:handleRecord") .end() .log("${in.headers}") // the headers of the exchange of the very first loop iteration .end()
Reason: Once the original exchange is set by UseOriginalAggregationStrategy#setOriginal(Exchange), it is not updated any more for loop iterations > 1.