camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vitalii Tymchyshyn <>
Subject Re: Default Exception handler and Dead Letter Channel mix
Date Mon, 08 Aug 2016 22:04:15 GMT
Why can't you use a global onException?
In the docs I see the limitation only for Java DSL. For XML DSL there is no
<routes>-specific settings, so I assume <camelContext> one should be picked

Best regards, Vitalii Tymchyshyn

Пн, 8 серп. 2016 о 12:08 javi.noguera <> пише:

> Hi,
> I'm using Camel 2.17 and what I'm looking is when there is an uncaught
> exception in any route after a redelivery go to a route to do some
> processing (inserts into a db, call a service, etc) and finally not handle
> the exception so the caller fails.
> I though about using a Dead Letter channel and send it to a route but after
> the route ends it marks the exception as handled so if the exception was
> thrown for example in a Splitter with stopOnException=true it keeps going.
> Then I tried to use the Default Exception Handler but it does not allow me
> to send a message before failing.
> I can not use a generic onException with handled in false since I'm loading
> the routes dynamically from XML and apparently there is no way to add it:
> I was thinking about extending the DefaultExceptionHandler so it can have a
> mixed functionality(go to a dead letter queue and not handle the exception)
> but I'm not sure how can do that since the handled policy seems to have
> been
> moved away the from the RedeliveryErrorHandler itself to the
> OnExceptionDefinition.
> Any ideas on how to do that or if there is another better way? Am I missing
> anything?
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

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