Loop has been edited by Hadrian Zbarcea (Jan 21, 2009). Content:LoopThe Loop allows to process the a message a number of times and possibly process them in a different way. Useful mostly for testing. For each iteration two properties are set on the Exchange that could be used by processors down the pipeline to process the Message in different ways.
that could be used by processors down the pipeline to process the Message in different ways. ExamplesThe following example shows how to take a request from the direct:x endpoint , then send the message repetitively to mock:result. The number of times the message is sent is either passed as an argument to loop(), or determined at runtime by evaluating an _expression_. The _expression_ must evaluate to an int, otherwise a RuntimeCamelException is thrown. Using the Fluent Builders Pass loop count as an argument from("direct:a").loop(8).to("mock:result");
|
Unsubscribe or edit your notifications preferences