Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.11.0
-
None
-
Unknown
Description
Does the Split/Aggregate EIP guarantee that messages will be aggregated in the original order?
public class CamelTest extends CamelTestSupport { @Override protected RoutesBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { from("direct:start") .split(body().tokenize(","), new StringAggregationStrategy()) .parallelProcessing() .to("mock:foo") .end() .to("mock:result"); } }; } @Test public void testSplitter() throws Exception { getMockEndpoint("mock:result").expectedBodiesReceived("123"); template.sendBody("direct:start", "1,2,3"); assertMockEndpointsSatisfied(); } }
With the above I get:
[ERROR] Failures:
[ERROR] CamelTest.testSplitter mock://result Body of message: 0. Expected: <123> but was: <231>
The actual order varies randomly from run to run.
In my real route I'm only able to reproduce this during the very first request after Camel has started.