Hello,

we have noticed a strange behavior beginning from Camel 4.8.2 concerning the 
Exception Handling: routes, that are created based on a route template, ignore 
completely the OnException clauses.

routeTemplate("onexceptionreprotemplate")
        .templateParameter("source")
        .templateParameter("target")
        .from("{{source}}")
            .onException(Exception.class)
                .log(LoggingLevel.ERROR, "Exception was thrown")
                .markRollbackOnly()
                .end()
            .log(LoggingLevel.INFO, "Starting the route")
            .to("{{target}}")
            .log(LoggingLevel.INFO, "Message sent");

In Camel 4.8.1 and above, if the {{target}} throws an exception, the steps 
inside the OnException are executed. This doesn't happen starting from Camel 
4.8.2. The route acts as if no OnException clause is defined.

Routes, not created based on templates, are not impacted by the behavior above. 
Steps inside the OnException are executed also in versions >= than 4.8.2

Could that be a bug introduced in 4.8.2 for routeTemplates

Regards
Farouk

Reply via email to