You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2026/07/25 12:37:25 UTC

(camel) branch main updated: CAMEL-24215: camel-resilience4j - JMX waitDurationInOpenState now returns millis

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 240b97ee8a37 CAMEL-24215: camel-resilience4j - JMX waitDurationInOpenState now returns millis
240b97ee8a37 is described below

commit 240b97ee8a37bb32dfbee5649d075b2fd24116d5
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Jul 25 14:37:18 2026 +0200

    CAMEL-24215: camel-resilience4j - JMX waitDurationInOpenState now returns millis
    
    Co-Authored-By: Claude Opus 4.6 <no...@anthropic.com>
---
 .../camel/component/resilience4j/ResilienceProcessor.java     |  2 +-
 .../modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc       | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/components/camel-resilience4j/src/main/java/org/apache/camel/component/resilience4j/ResilienceProcessor.java b/components/camel-resilience4j/src/main/java/org/apache/camel/component/resilience4j/ResilienceProcessor.java
index 932aa5e6f054..d8bb0f14511e 100644
--- a/components/camel-resilience4j/src/main/java/org/apache/camel/component/resilience4j/ResilienceProcessor.java
+++ b/components/camel-resilience4j/src/main/java/org/apache/camel/component/resilience4j/ResilienceProcessor.java
@@ -469,7 +469,7 @@ public class ResilienceProcessor extends BaseProcessorSupport
 
     @ManagedAttribute
     public long getCircuitBreakerWaitDurationInOpenState() {
-        return Duration.ofMillis(circuitBreakerConfig.getWaitIntervalFunctionInOpenState().apply(1)).getSeconds();
+        return Duration.ofMillis(circuitBreakerConfig.getWaitIntervalFunctionInOpenState().apply(1)).toMillis();
     }
 
     @ManagedAttribute
diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
index 4fbd5c18e784..7ed9914538dd 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
@@ -1066,6 +1066,17 @@ The `io.vavr:vavr` and `io.vavr:vavr-match` runtime dependencies have been remov
 `camel-resilience4j`. The single internal usage of Vavr's `Try` monad has been replaced with a
 plain try-catch. This eliminates two transitive runtime JARs. No user-facing behavior change.
 
+=== camel-resilience4j - JMX waitDurationInOpenState now reports milliseconds
+
+The JMX managed attribute `CircuitBreakerWaitDurationInOpenState` previously reported seconds
+(using `Duration.getSeconds()`). It now reports milliseconds (using `Duration.toMillis()`) to be
+consistent with all other duration attributes (`BulkheadMaxWaitDuration`, `TimeoutDuration`) and
+with the option itself, which was changed from seconds to milliseconds in the same release
+(see above).
+
+If you have JMX-based monitoring that reads this attribute, update the expected unit from seconds
+to milliseconds.
+
 === camel-clickhouse (new component)
 
 A new `camel-clickhouse` producer component has been added. It integrates with