Search code examples
apache-camelspring-camel

How can I know when the route completes processing a directory in camel?


How can I get a trigger once my route completes processing a directory and its sub directories in camel ? Is there any way I can specify this in the route ?


Solution

  • Yes if its from("file:..") then its a batch consumer, and you can find the information on the last file which has a message header with CamelBatchComplete with the value true.

    See more details at the Camel website: http://camel.apache.org/batch-consumer.html