You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/07/24 07:54:00 UTC

[jira] [Updated] (CAMEL-16802) camel-core - Split / Aggregate with parallelprocessing aggregates in random order

     [ https://issues.apache.org/jira/browse/CAMEL-16802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-16802:
--------------------------------
    Summary: camel-core - Split / Aggregate with parallelprocessing aggregates in random order  (was: Split / Aggregate with parallelprocessing aggregates in random order)

> camel-core - 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
>          Components: camel-core
>    Affects Versions: 3.11.0
>            Reporter: Sergio Penkale
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.11.1, 3.12.0
>
>
> 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)