[ 
https://issues.apache.org/jira/browse/CAMEL-17726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-17726:
--------------------------------
    Priority: Major  (was: Minor)

> route controller: allow to mark a route as failed
> -------------------------------------------------
>
>                 Key: CAMEL-17726
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17726
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-controlbus, camel-core
>            Reporter: Luca Burgazzoli
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.16.0
>
>
> The camel-controlbus allow to control routes i.e. you can stop it.
> In some circumstances it may be useful to stop a route as pat of the error 
> handling strategy and let the health check report the application as not 
> ready.
> As example, one may think to do something like:
> {code:java}
> from("timer:tick")
>         .routeId("main")
>         .process(e -> { throw new RuntimeCamelException("error happended")); 
> })
>         
> .errorHandler(deadLetterChannel("controlbus:route?routeId=current&action=stop"))
>         .to("log:info?showAll=true");
> {code}
> This would result in the route being stopped but the health check won't 
> report the application as not ready because:
> - the RouteHealthCheck code would report the route as UNKNOWN
> - the RouteError is cleared up when the route is stopped.
> It may be useful to enrich the control-bus with some additional *failure* 
> attributes, something like:
> {code}
> controlbus:route?routeId=current&action=stop&fail=true&propagateException=true"
> {code}
> Where:
> * *fail=true* tells the control bus that the route should be stopped but also 
> marked as failed
> * *propagateException=true* tells the control bus that if the exchange is 
> failed, the exception need to be propagated to the route and preserved (not 
> cleaned up on stop)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to