You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Sergio Penkale (Jira)" <ji...@apache.org> on 2021/07/12 15:41:00 UTC
[jira] [Created] (CAMEL-16802) Split / Aggregate with
parallelprocessing aggregates in random order
Sergio Penkale created CAMEL-16802:
--------------------------------------
Summary: Split / Aggregate with parallelprocessing aggregates in random order
Key: CAMEL-16802
URL: https://issues.apache.org/jira/browse/CAMEL-16802
Project: Camel
Issue Type: Bug
Affects Versions: 3.11.0
Reporter: Sergio Penkale
Does the Split/Aggregate EIP guarantee that messages will be aggregated in the original order?
{code:java}
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();
}
}
{code}
With the above I get:
{code:java}
[ERROR] Failures:
[ERROR] CamelTest.testSplitter mock://result Body of message: 0. Expected: <123> but was: <231>
{code}
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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)