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

UseOriginalAggregationStrategy in outer loops

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.21.2
    • 2.21.3, 2.22.1, 2.23.0
    • camel-core
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: