title: Exit from Apache Camel loop
body: <p>I want to exit from Camel Loop at some condition. I am using Camel 2.15</p>
  
  <pre><code> .loop(simple("${exchangeProperty.loopCount}"))
     .to("bean:xxx?method=exitFromLoop")
   .end()
  </code></pre>
  
  <p>I tried changing CamelLoopIndex and CamelLoopSize in exitFromLoop method, but didn't worked for me.</p>
  
  <p>Is there any alternative to this e.g using choice/when?</p>