Why do my file consumer not pickup the file, and how do I let the file consumer use the Camel error handlerThere 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. How to use the Camel error handler with the file consumerWell 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. 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. |