Bug 1112059 - Timeout occurs when setting handled(true) in Camel route's onException()
Summary: Timeout occurs when setting handled(true) in Camel route's onException()
Keywords:
Status: MODIFIED
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: SwitchYard
Version: 6.0.0 GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: DR3
: 6.1.0
Assignee: Rob Cernich
QA Contact: Matej Melko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-23 04:45 UTC by Tadayoshi Sato
Modified: 2021-11-08 10:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1142876 (view as bug list)
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
Reproducer (17.02 KB, application/zip)
2014-06-23 04:48 UTC, Tadayoshi Sato
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SWITCHYARD-1927 0 Major Closed Caught exception in CamelRoute leads to timeout 2018-10-30 13:54:40 UTC
Red Hat Issue Tracker SWITCHYARD-1991 0 Major Resolved Camel routing properties leak out from service implementation routes 2018-10-30 13:54:40 UTC

Description Tadayoshi Sato 2014-06-23 04:45:35 UTC
Description of problem:
Platform BZ for https://issues.jboss.org/browse/SWITCHYARD-1927 & https://issues.jboss.org/browse/SWITCHYARD-1991

In a Camel route like the following, when an exception is thrown in the normal route and caught in the onException route, 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 [1], which is that the following onException clause can send a response back to the caller:

    onException(MyFunctionalException.class)
        .handled(true)
        .transform().constant("Sorry");

[1] https://access.redhat.com/site/documentation/en-US/Red_Hat_JBoss_Fuse/6.0/html/Implementing_Enterprise_Integration_Patterns/files/BasicPrinciples-ExceptionHandling-ExClause.html

Comment 1 Tadayoshi Sato 2014-06-23 04:48:15 UTC
Created attachment 911254 [details]
Reproducer

Comment 2 JBoss JIRA Server 2014-06-27 16:56:03 UTC
Keith Babo <kbabo> updated the status of jira SWITCHYARD-1927 to Closed


Note You need to log in before you can comment on or make changes to this bug.