Just a thought ...

from("direct:loop")
    .process(
        // set special header if loop should continue
    );
    .switch()
        .when( specialHeaderIsSet ).to("direct:loop")
        .otherwise("direct:nextStep")
;



Jan



> -----Ursprüngliche Nachricht-----
> Von: gargankur007 [mailto:[email protected]]
> Gesendet: Freitag, 5. Juni 2015 08:56
> An: [email protected]
> Betreff: Re: Using loop EIP to solve a Usecase
> 
> Can I stop the loop in between based on some condition?
> 
> So I fix the number of iterations to high number and then based on some
> condition terminate the loop early.
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Using-
> loop-EIP-to-solve-a-Usecase-tp5767874p5767894.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to