Timeout occurs when setting handled(true) for onException() in a SwitchYard Camel route
Issue
-
In a Camel route like the following, when an exception is thrown in the normal route and caught in the
onExceptionroute, the message won't be replied back to the caller of the Camel service and thus eventually timeout exception happens at a service gateway binding:onException(Exception.class) .handled(true) .transform().simple("ERROR: ${exception.message}"); from("switchyard://ProxyService") .handleFault() .to("switchyard://ReverseService") .transform().simple("OK: ${body}"); -
Note that this behaviour contradicts the normal behaviour of Camel, in which the following
onExceptionclause can send a response back to the caller:onException(Exception.class) .handled(true) .transform().simple("ERROR: ${exception.message}");
Environment
- Red Hat JBoss Fuse Service Works (FSW)
- 6.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
