camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Mistroni <>
Subject custom error handler
Date Mon, 09 Apr 2012 14:56:08 GMT
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=""
        id="camelServer" errorHandlerRef="deadLetterErrorHandler">

        <camel:errorHandler id="deadLetterErrorHandler"


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 =

    public void handleException(Object exception) {"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

w/kindest regards

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message