camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Babak Vahdat <>
Subject Re: File consumer - waiting for it to start
Date Tue, 07 Feb 2012 07:36:49 GMT
> Can someone point me to an example that shows how to do what I'm 
> trying to do here? 

Claus has provided 2 new unit-tests based on the discussion on this thread:

> The issue seems to be knowing when I'm done (all the files have been 
> consumed). Is there a way to do that? Is it documented anywhere? 

You could make use of your own shutdown strategy for this purpose which then
would be done *once* in contrast to onCompletion() clause on your route:

But you could also do your cleanup logic completely decoupled from Camel,
that's as soon as Camel Context has been shut down do whatsoever you want to
do! But if you want to do that logic using Camel then your own shutdown
strategy is a possible option for this purpose.

> Does sendEmptyMessageWhenIdle=true mean that it'll send a null message 
> after processing all of the files or only if there are no files when 
> it starts? 

It will do that as soon as the condition is given! that's no more file to
pickup. This condition could be either given right after your startup (the
directory was empty) or after being up for a while and having processed all
existing files.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message