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

Claus Ibsen reassigned CAMEL-24185:
-----------------------------------

    Assignee: Claus Ibsen

> Circuit Breaker EIP - suspend/resume should preserve breaker state
> ------------------------------------------------------------------
>
>                 Key: CAMEL-24185
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24185
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-microprofile-fault-tolerance, eip
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>
> Neither FaultToleranceProcessor nor ResilienceProcessor override 
> doSuspend()/doResume(), so a route suspend falls through to doStop() which 
> resets the circuit breaker state:
> * FT: CircuitBreakerMaintenance.get().reset(id) clears the breaker back to 
> CLOSED
> * Resilience4j: circuitBreakerRegistry.remove(id) removes the breaker entirely
> This means a temporarily suspended route loses its OPEN breaker protection. 
> When resumed, the breaker starts fresh in CLOSED state, potentially sending 
> traffic to a service that was failing moments ago.
> Stop/start resetting state is fine (full lifecycle reset, like a fresh boot). 
> But suspend/resume is meant to be lightweight and temporary - breaker state 
> should survive it.
> Proposed fix: override doSuspend()/doResume() in both processors to skip the 
> breaker cleanup that doStop() performs.
> Related: CAMEL-24136 (umbrella for circuit breaker review findings, finding 
> M5).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to