Yeah, I probably should have been more clear. And I meant dynamic router, not distribution list.
Put the body of your loop into its own route, let's say direct://foo To execute the loop (in Java DSL): .setHeader("loop", constant("direct://foo")) .dynamicRouter().header("loop") // Anything here is called when the loop exits Within the direct://foo route set the loop header to null (or remove the header) when you want to exit the loop On Mon, Sep 30, 2013 at 10:43 AM, Goyal, Arpit <arpit.go...@sap.com> wrote: > Hi Dale, > > What you mean by use distribution list to set header to NULL? Can you > share the example (Spring DSL if possible) > Do you mean that we should change the value of Headers > "LOOP_INDEX" & "LOOP_SIZE"? > > Is this the JIRA Item for the same? --> > https://issues.apache.org/jira/browse/CAMEL-4564?jql=text%20~%20%22Loop%20EIP%22 > This propose to create new DSL element (loopTo)? > > Regards, > Arpit. > > -----Original Message----- > From: Dale King [mailto:d...@jadabeauty.com] > Sent: Monday, September 30, 2013 7:24 PM > To: users@camel.apache.org > Subject: Re: Extend Camel Loop to support While Behavior > > There is a JIRA from a year or 2 ago that has no progress. This would be > trivial to add. > > The work around is to use distribution list on a header and when you want > to exit set that header to null. > > On Sep 30, 2013, at 2:28 AM, Claus Ibsen <claus.ib...@gmail.com> wrote: > > > Hi > > > > Yeah we have talked about this in the past. Not sure if there is a > > JIRA. You are welcome to look and if you cant find a JIRA then log a > > new JIRA for this. > > > > > > > > On Mon, Sep 30, 2013 at 6:01 AM, Goyal, Arpit <arpit.go...@sap.com> > wrote: > >> Hi Claus, > >> > >> Is there a plan to support Camel Loop to support While behavior? Is > there a jira issue for the same? > >> > >> Regards, > >> Arpit. > > > > > > > > -- > > Claus Ibsen > > ----------------- > > Red Hat, Inc. > > Email: cib...@redhat.com > > Twitter: davsclaus > > Blog: http://davsclaus.com > > Author of Camel in Action: http://www.manning.com/ibsen > > -- Dale King