HI all i plan to deploy my apache camel app remotely, and i would like to configure an error handler so that , when an exception happens, it sends me an email with the exception details.
I have read camel error handling docs, and i guess the best approach for me would be to use a deadLetterErrorHandler with a deadLetterUri="bean:exceptionHandler?method=handleException" I have this camel config <camel:camelContext xmlns="http://camel.apache.org/schema/spring" id="camelServer" errorHandlerRef="deadLetterErrorHandler"> <camel:errorHandler id="deadLetterErrorHandler" type="DeadLetterChannel" deadLetterUri="bean:exceptionHandler?method=handleException"/> ......... in one of my routes i an explicitly raising a n exception to test the error handler behaviour..... however it appears that the method handleException is never being called.... this is the code of my exceptionHandler Bean class ExceptionHandler { private static final Log LOGGER = LogFactory.getLog(ExceptionHandler.class); public void handleException(Object exception) { LOGGER.info("Handling exceptions:" + exception); } } what am i missing? or are there any better approaches to configure a custom error handler ? I am not interested in propagating the exception (as exceptions will happen only at endpoints....) w/kindest regards marco
