camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henryk Konsek <>
Subject Re: Polling consumer: how to recognize an empty directory
Date Fri, 03 Aug 2012 14:18:42 GMT
> Just an idea:
> - before pooling, create a file with specified name, for example
> /TEST-POOLING/ and skip this file while processing. If there is only test
> file in directory, you will get /CamelBatchComplete/.
> - simpler: before starting the route, check if there is any file in
> particular directory :-)

I would not recommend such workarounds in Camel >= 2.9 since (as Achim
said) we got "sendEmptyMessageWhenIdle" to indicate that the directory
is empty. In Camel >= 2.0 "sendEmptyMessageWhenIdle" is a way to go :)

BTW MichaƂ, How exactly you want to skip file from the processing? If
you exclude it with filter and it is only file in the directory, you
will got no message at all. :)

Henryk Konsek

View raw message