You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Önder Sezgin (JIRA)" <ji...@apache.org> on 2018/08/06 21:04:00 UTC

[jira] [Commented] (CAMEL-12709) UseOriginalAggregationStrategy in outer loops

    [ https://issues.apache.org/jira/browse/CAMEL-12709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16570771#comment-16570771 ] 

Önder Sezgin commented on CAMEL-12709:
--------------------------------------

i think this is on purpose. what loop-eip and split-eip with UseOriginalAggregationStrategy do it is right with the route definition you have given. i think this is not a bug, this is your routing design issue.

> UseOriginalAggregationStrategy in outer loops
> ---------------------------------------------
>
>                 Key: CAMEL-12709
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12709
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.21.2
>            Reporter: Matthias Humbert
>            Priority: Major
>
> Using splitters with the UseOriginalAggregationStrategy +in a loop+ causes the splitter to return always the same original exchange.
>  
> {code:java}
> // 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()
> {code}
> Reason: Once the original exchange is set by UseOriginalAggregationStrategy#setOriginal(Exchange), it is not updated any more for loop iterations > 1.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)