camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "javi.noguera" <javi.nogu...@gmail.com>
Subject Default Exception handler and Dead Letter Channel mix
Date Mon, 08 Aug 2016 16:08:31 GMT
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:
http://camel.apache.org/loading-routes-from-xml-files.html

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: http://camel.465427.n5.nabble.com/Default-Exception-handler-and-Dead-Letter-Channel-mix-tp5786163.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message