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

Andrea Cosentino updated CAMEL-24214:
-------------------------------------
    Issue Type: Bug  (was: Task)

> camel-jbang - circuit-breaker example still uses seconds for 
> waitDurationInOpenState (now millis)
> -------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24214
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24214
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>    Affects Versions: 4.22.0
>            Reporter: Andrea Cosentino
>            Assignee: Andrea Cosentino
>            Priority: Minor
>             Fix For: 4.22.0
>
>
> Follow-up from CAMEL-24137 (Circuit Breaker EIP modernization, phase 1), 
> merged as {{c5b1068faae3}}.
> That change redefined {{waitDurationInOpenState}} and 
> {{slowCallDurationThreshold}} from *seconds* to *milliseconds* (accepting 
> Camel duration strings such as {{60s}}). The upgrade guide documents the 
> migration correctly.
> However, Camel's own shipped jbang example was not migrated:
> {{dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/eip/circuit-breaker/route.camel.yaml}}
>  line 30:
> {noformat}
> - circuitBreaker:
>     resilience4jConfiguration:
>       waitDurationInOpenState: 20
> {noformat}
> Before the change this meant 20 seconds. On 4.22.0 it means *20 
> milliseconds*, so the open state expires almost immediately and the example 
> no longer demonstrates a circuit breaker at all.
> This is the exact migration trap the upgrade guide warns users about, left 
> unmigrated in the example users are most likely to copy.
> h3. Suggested fix
> Change the value to {{20s}} (preferred, self-documenting) or {{20000}}.
> I grepped the tree for 
> {{waitDurationInOpenState|slowCallDurationThreshold|wait-duration-in-open-state|slow-call-duration-threshold}};
>  this is the only remaining bare seconds value. The other hits are a 
> size-test fixture in camel-servlet and help text in the jbang TUI plugin 
> ("default: 60s"), both unaffected.



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

Reply via email to