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

loopDoWhile will loop forever if using ahc component in the loop.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.17.0
    • 2.17.1, 2.18.0
    • camel-core
    • None
    • Unknown

    Description

      I have tested several times. The loop condition will not be checked if ahc component is in the loop.
      from("quartz2://jf-log/trigger3?trigger.repeatInterval=2&trigger.repeatCount=0")
      .loopDoWhile(body().isNotEqualTo("done"))
      .setHeader(Exchange.HTTP_METHOD, constant("GET"))
      .to("ahc:https://www.baidu.com/")
      .choice()
      .when(exchangeProperty("CamelLoopIndex").isEqualTo(3))
      .setBody(constant("done"))
      .endChoice()
      .end()
      .end()
      .to("mock:result");
      The loop will be infinite, the workarround is to use http component instead of ahc.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            sanigo@gmail.com Sanigo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: