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

Claus Ibsen resolved CAMEL-24217.
---------------------------------
    Resolution: Fixed

> camel-main - Resilience4jConfigurationProperties Integer->String API break 
> not in the 4.22 upgrade guide
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24217
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24217
>             Project: Camel
>          Issue Type: Task
>          Components: camel-main
>            Reporter: Andrea Cosentino
>            Assignee: Andrea Cosentino
>            Priority: Major
>             Fix For: 4.22.0
>
>
> Follow-up from CAMEL-24137 (Circuit Breaker EIP modernization, phase 1), 
> merged as {{c5b1068faae3}}.
> That change altered public method signatures in {{core/camel-main}}:
> {{core/camel-main/src/main/java/org/apache/camel/main/Resilience4jConfigurationProperties.java}}
>  — getters, setters and fluent builders changed parameter/return type from 
> {{Integer}} to {{String}}, with no retained overload. Confirmed on {{main}}:
> * {{getWaitDurationInOpenState()}} line 224, 
> {{setWaitDurationInOpenState(String)}} line 232
> * {{getTimeoutDuration()}} line 332, {{setTimeoutDuration(String)}} line 340
> * {{withWaitDurationInOpenState(String)}} line 516
> and the corresponding {{slowCallDurationThreshold}} / 
> {{bulkheadMaxWaitDuration}} members.
> This is both source- and binary-incompatible. Code such as:
> {noformat}
> main.configure().resilience4j().withTimeoutDuration(1000);
> {noformat}
> no longer compiles.
> h3. Gap
> The 4.22 upgrade guide entry ("camel-resilience4j - Duration options now use 
> Camel duration format") is thorough about the *Java DSL* {{int}} overloads 
> and about {{application.properties}} keys, but it never mentions this class 
> or the programmatic {{camel-main}} API. A user configuring circuit breakers 
> through {{MainConfigurationProperties}} in Java gets a compile error with no 
> corresponding guide entry.
> Note {{timeoutDuration}} and {{bulkheadMaxWaitDuration}} were *already* 
> milliseconds, so for those two this is a pure type break with no semantic 
> change — worth stating explicitly so users know they only need a cast/quote, 
> not a value conversion.
> h3. Suggested fix
> Add a short subsection to the existing camel-resilience4j entry in 
> {{docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc}} 
> covering {{Resilience4jConfigurationProperties}}, e.g.:
> {noformat}
> // Before:
> main.configure().resilience4j().withTimeoutDuration(1000);
> // After:
> main.configure().resilience4j().withTimeoutDuration("1000");   // or "1s"
> {noformat}
> Alternatively, retain deprecated {{Integer}} overloads that delegate, if 
> source compatibility is judged worth preserving for 4.x.



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

Reply via email to