davsclaus opened a new pull request, #24957:
URL: https://github.com/apache/camel/pull/24957

   ## Summary
   
   Circuit Breaker EIP modernization — phase 1 of 
[CAMEL-24137](https://issues.apache.org/jira/browse/CAMEL-24137). Covers 
sub-items Z1, Z4, Z5, Z6, Z7, and Z8.
   
   **Z1 — Remove Vavr dependency:** Replaced the single Vavr `Try` monad usage 
in `ResilienceProcessor` with a plain try-catch. Removed `io.vavr:vavr` and 
`io.vavr:vavr-match` direct dependencies and the `vavr-version` property from 
`parent/pom.xml` (no other module used Vavr).
   
   **Z4 — Duration unit consistency:** Changed 4 duration fields in the 
resilience4j configuration model from `javaType = "java.lang.Integer"` (with 
mixed seconds/millis semantics) to `javaType = "java.time.Duration"`. All 
duration options now accept Camel duration expressions (`60s`, `1m`, `PT1M`) as 
well as plain millisecond values. **Breaking change:** 
`waitDurationInOpenState` and `slowCallDurationThreshold` defaults changed from 
`60` (seconds) to `60000` (millis). Users who configured plain integer values 
meaning seconds must update to duration strings (e.g. `60s`) or milliseconds 
(e.g. `60000`).
   
   **Z5 — Expose missing resilience4j 2.x features:** Added 3 new configuration 
options:
   - `slidingWindowSynchronizationStrategy` (enum: LOCK_FREE, SYNCHRONIZED) — 
thread safety mode for sliding window
   - `maxWaitDurationInHalfOpenState` (Duration) — max time in half-open state 
before reopening
   - `bulkheadFairCallHandlingEnabled` (boolean) — fair vs unfair semaphore in 
bulkhead
   
   **Z6 — Deprecate onFallbackViaNetwork:** Deprecated `onFallbackViaNetwork()` 
DSL method and `fallbackViaNetwork` option — a Hystrix-era concept that both 
current implementations reject with `UnsupportedOperationException`.
   
   **Z7 — Clarify micrometerEnabled scope:** Updated description to clarify 
that `micrometerEnabled` is a global setting enabling Micrometer metrics for 
all circuit breaker instances (not per-route).
   
   **Z8 — Fix exchange property bugs and add tests:** Fixed two bugs in 
`ResilienceProcessor`:
   - `RESPONSE_TIMED_OUT` exchange property was never set when a fallback was 
configured (only set in the no-fallback branch)
   - `EXCEPTION_CAUGHT` was null during timeouts with fallback (the 
`TimeoutException` is thrown on the caller thread, not set on the exchange)
   Added 4 new tests covering timeout and fallback exchange properties in both 
normal and pooled exchange factory modes.
   
   ## Test plan
   
   - [x] All existing `camel-resilience4j` tests pass
   - [x] 4 new tests added and passing: 
`ResilienceTimeoutExchangePropertyTest`, 
`ResilienceTimeoutWithFallbackExchangePropertyTest`, 
`ResiliencePooledTimeoutTest`, `ResiliencePooledFallbackTest`
   - [x] Generated catalog, XML-IO, YAML-IO, YAML-DSL, and endpoint-DSL all 
regenerated
   
   _Claude Code on behalf of davsclaus_
   
   Co-Authored-By: Claude Opus 4.6 <[email protected]>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to