Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12709

UseOriginalAggregationStrategy in outer loops

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.21.2
    • Fix Version/s: 2.21.3, 2.22.1, 2.23.0
    • Component/s: camel-core
    • Labels:
      None

      Description

      Using splitters with the UseOriginalAggregationStrategy in a loop causes the splitter to return always the same original exchange.

       

      // 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()
      

      Reason: Once the original exchange is set by UseOriginalAggregationStrategy#setOriginal(Exchange), it is not updated any more for loop iterations > 1.

       

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              Matthi Matthias Humbert
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: