On 14 May 2013, at 18:10, Peter Hilton <[email protected]> wrote:
> …
>
> val deadLetterErrorHandler =
> deadLetterChannel(failureEndpoint).disableRedelivery()
> deadLetterErrorHandler.setFailureProcessor(ErrorProcessor())
> errorHandler(deadLetterErrorHandler)
>
> This is okay, but I would prefer to encapsulate all of the above in a single
> component that I can then give to errorHandler(…) for every route builder.
Correction: this error handler doesn't work. The ErrorProcessor logs the
failure as expected, but the message file is not moved to the dead letter
failure endpoint :(
Perhaps it’s possible to use a dead letter endpoint and handle the exception
separately logging…
errorHandler(deadLetterChannel(failureEndpoint).disableRedelivery())
…
hanlde[Exception] {
// Log error…
…
Peter