Hi Leen,

I'm not sure if I got your question right, but you can use a filter to
find out whether the read method returned a non-empty list and then
either stop processing that message further using stop [1] or stop the
whole route [2]

[1] http://camel.apache.org/message-filter.html
[2] http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html

Bilgin

On 8 June 2012 10:44, Leen Toelen <[email protected]> wrote:
> Hi,
>
> I have a route like this:
>
> <camel:route>
> <from uri="timer://foo?period=30000" />
> <camel:bean ref="myReader" method="read"/>
> <camel:process ref="myProcessor"/>
> <camel:bean ref="myReader" method="delete"/>
> </camel:route>
>
> where the read() method returns a list of results, but most of the time the
> result list will be empty. I would like to configure the route so that when
> the read() method does return at least one result, the route is processed
> and continues to call read() until there are no more results.
>
> Is this possible?
>
> Regards,
> Leen

Reply via email to