> 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: https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/StopCamelFromRouteTest.java https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/StopCamelFromRouteTest.java > 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: http://camel.apache.org/graceful-shutdown.html 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. Babak -- View this message in context: http://camel.465427.n5.nabble.com/File-consumer-waiting-for-it-to-start-tp5455062p5462431.html Sent from the Camel - Users mailing list archive at Nabble.com.