Yoshi2626
Yoshi2626

Reputation: 1

Implementing onCompletionExceptionHandler for Camel

I have been trying to implement unsuccessfully onCompletionExceptionHandler to hide a warning printed by the GenericFileOnCompletion component because of a file renaming error (where the file originally existed, but was removed by the time of the GenericFileOnCompletion). Are there any good links that give an example as to how to do this?? Or an example??

I have tried to do:

from("file://C:/temp?onCompletionExceptionHandler=MyHandler")

But this gives me a FailedToCreateRouteException.

Upvotes: 0

Views: 319

Answers (1)

Claus Ibsen
Claus Ibsen

Reputation: 55555

Make sure to use the #beanId syntax, eg

from("file://C:/temp?onCompletionExceptionHandler=#MyHandler")

Where MyHandler is the bean name (bean id) of the bean that implements the ExceptionHandler.

There is a bit of documentation about this here: http://camel.apache.org/how-do-i-configure-endpoints.html

Upvotes: 1

Related Questions