Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.17.0
-
Component/s: camel-core
-
Labels:None
-
Estimated Complexity: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.