Is it possible to configure Apache Camel File component to use Java 7 WatchService rather than scan input directory periodically?
If no, is it possible to achieve the same goal (i.e. avoid file system scans when nothing changed) with Camel “easily”?
Updated to remove wrong info
You can write such a component, maybe by extending the File component.
Or even simpler, build something very simple with the ´WatchService´ that fires of a trigger message to the File component when there is a file to pick up. Then you just have to worry about the file logic, which works rather well with Camel.
Something like: