I'm doing a lot of file transfer from and to different destinations using
file/ftp/ftps/sftp. I use the "move" and "moveFailed" options to archive
succesfully handled files in one directory and failed files in another
directory.This works fine without the need for any specific error handler.

However, I now want to use an error handler to:

- Customise the redelivery options
- Notify a system administrator that a file transfer has failed so that
recovery actions can be initiated

It seems to be very difficult to combine these two aspects. One way is to
declare an error handler and then mark the exchange as "handled(false)" as
follows:

  
errorHandler(defaultErrorHandler().maximumRedeliveries(10).delayPattern("...").handled(false));

However, the "handled" option seems to be deprecated. I read the following
conversation:

http://www.mail-archive.com/users@camel.apache.org/msg08254.html

It seems like the idea is that if an error handler is used, then it should
always handle the error (sounds logical considering it's called "error
handler"). What I don't understand then is how I can combine the
"move/moveFailed" options with an error handler for redelivery purposes AND
the ability to perform additional actions (notifying by some means). The
latter would be solved perfectly if I could direct the error handler to an
arbitrary route but I think that can only be done in "onException".

Anyone have any suggestions?

/Bengt

Reply via email to