Why does my file consumer not pick up the file, and how do I let the file consumer use the Camel error handler?Page edited by Reuben Garrett
Comment:
minor editorial changes
Changes (9)
Full ContentWhy does my file consumer not pick up 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. How to use Camel's routing error handlers with the file consumerWell, this is really a "chicken or the egg" question. The Camel error handler (e.g., in the routes) only applies when a message is being routed by the routing engine. If the component consumer extends the DefaultConsumer from Camel, then it offers an org.apache.camel.spi.ExceptionHandler hook for end users to plug-in a custom strategy. 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, which then allows the routing engine to trigger its own error handling to deal with the exception.
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache Camel > Why does my file consumer not pick up ... confluence
