Thanks Claus, I will investigate those options further. /Bengt
2010/6/22 Claus Ibsen <claus.ib...@gmail.com> > Hi > > You can use onException to define the customize the redelivery options > Its handled = false by default. > > > onException(Exception.class).maximumRedeliveries(10).delayPattern("...").handled(false)); > And you can have it detour the message so you can send to a bean or > whatever to send that failure email. > http://camel.apache.org/exception-clause.html > > > You can also use onCompletion for that and have a route when the on > completion failed. > http://camel.apache.org/oncompletion.html > > > On Tue, Jun 22, 2010 at 11:34 AM, Bengt Rodehav <be...@rodehav.com> wrote: > > 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 > > > > > > -- > Claus Ibsen > Apache Camel Committer > > Author of Camel in Action: http://www.manning.com/ibsen/ > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus >