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:36:00 UTC
[jira] [Issue Comment Deleted] (CAMEL-16802) 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:
--------------------------------
Comment: was deleted
(was: Ah yeah its a bug somewhere in the new AsyncCompletionService that replaced the SubmitOrderedCompletionService (from 2.x) which seems to have a problem with returning the tasks in the submitted order.
If you use streaming mode then they are aggregated in whatever order they are completed.)
> 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
> Priority: Major
> Fix For: 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)