camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Radoslaw Szymanek (Commented) (JIRA)" <>
Subject [jira] [Commented] (CAMEL-5139) Continued(Predicate) does not work when invoked the second time in the Camel flow.
Date Fri, 13 Apr 2012 12:47:18 GMT


Radoslaw Szymanek commented on CAMEL-5139:

Thank you for the explanation. 

I just thought it was a cool feature of Camel to be able to redefine the onException policy
within one route just in case if different processors happen to raise the same recoverable
exception for different reasons. 

It is not easy to figure out what is good design and what is bad design in the context of
error handling. The current Java DSL is very flexible, so Camel developers views/opinions
are not enforced. It will be great if a new version of Java DSL is somewhat more strict to
reflect your expert knowledge of what is a good route design. 

I will note in my coding guidelines for Camel that redefining on exception policies is not
well supported now and will not be allowed later on. 
> Continued(Predicate) does not work when invoked the second time in the Camel flow.
> ----------------------------------------------------------------------------------
>                 Key: CAMEL-5139
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.1
>            Reporter: Radoslaw Szymanek
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.2, 2.10.0
> When Camel flow contains error handling as continued(Predicate), it is not invoked when
the error occurs for the second time (even in different onException). What is more the exception
is not handled even by global onException and Camel flow is interrupted. 
> It is similar issue to
> but not for continued(true) but continued(Predicate). 
> The same fix also fixes this problem. Simply adding 
> exchange.removeProperty(Exchange.FAILURE_HANDLED);
> just before returning true from the Predicate makes the second onException being called
and the second time the exception is raised it can be continued again. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message