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 up.
Best regards, Vitalii Tymchyshyn Пн, 8 серп. 2016 о 12:08 javi.noguera <[email protected]> пише: > 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. >
