Why do my file consumer not pickup the file, and how do I let the file consumer use the Camel error handler

There could be several reasons why the File consumer is not picking up files. For example it may not run at all, or it cannot acquire a read lock on the file.
Check the logs to see if you can see any exceptions / messages being logged. You can turn on DEBUG logging at org.apache.camel.component.file to see more details.

How to use the Camel error handler with the file consumer

Well this is really a chicken and egg questions. The Camel error handler (eg in the routes) does only apply when a message is being routed by the routing engine.
Before this happens a consumer must successfully receive a message, and created a Camel Exchange, and populate the Exchange with message details (eg body and headers), and then pass the Exchange to the routing engine. Only at this point the routing error handler can deal with exceptions occurring. Before this point, any error handling is really Component specific.

If the component consumer extends the DefaultConsumer from Camel, then this consumer offers a org.apache.camel.spi.ExceptionHandler the component can use to allow a hook for end users to plugin their custom implementation. The default implementation from Camel is LoggingExceptionHandler that will log the exception at ERROR/WARN level, and then ignore the exception.

See the File page in the bottom for an example how to use a custom ExceptionHandler that sends a new message to the Camel routing engine, that then allows the routing engine to trigger its error handling to deal with the exception.

© 2004-2011 The Apache Software Foundation.
Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram