It works when I config an interceptor and set a header value in
"onException-handler":


          interceptFrom()
            .when(header("somethingFailed").isEqualTo(Boolean.TRUE))
            .process(new Processor() {

                        @Override
                        public void process(Exchange exchange) throws Exception 
{
                                LOG.debug("Failed: " + 
exchange.getExchangeId());
                                
                        }
                
            })
            .to("direct:failed");


// Exception handling
                .onException(Throwable.class)
                .continued(true)
                .process(new Processor() {
                                @Override
                                        public void process(Exchange exchange) 
throws Exception {
                                                
exchange.getOut().setHeader("splitFailed", Boolean.TRUE);                       
                        
                                        }
                        })                                              
                        .end()  
                        // - Exception handling
                       .to("direct:originalRoute")




--
View this message in context: 
http://camel.465427.n5.nabble.com/Reroute-from-onException-Handler-Processor-tp5746043p5746084.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to