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

   ## Summary
   
   _Claude Code on behalf of davsclaus_
   
   - Adds a new `asynchronous` option (default `false`) to the Resilience4j 
circuit breaker configuration
   - When enabled, uses Resilience4j's `CompletionStage`-based decorators 
(`CircuitBreaker.decorateCompletionStage`, `Bulkhead.decorateCompletionStage`, 
`TimeLimiter.decorateCompletionStage`) for true non-blocking processing
   - The caller thread is released immediately and processing completes 
asynchronously via `callback.done(false)`
   - Sync and async code paths are in separate methods 
(`processSync`/`processAsync`) for clarity and maintainability
   - Fallback remains synchronous (by design)
   - When async mode is used with timeout, the `timeoutExecutorService` must be 
a `ScheduledExecutorService` — validated at startup with a clear error message
   - Thread model improvement: async+timeout uses 1 thread briefly (vs 2 
blocked threads in sync mode); async without timeout uses 0 extra threads
   
   ## Test plan
   
   - [x] `ResilienceAsyncRouteOkTest` — basic async success path (with and 
without timeout)
   - [x] `ResilienceAsyncTimeoutTest` — async + timeout with fast/slow routes
   - [x] `ResilienceAsyncTimeoutWithFallbackTest` — async + timeout + fallback
   - [x] `ResilienceAsyncTimeoutWriteBackRaceTest` — exchangeWriteGuard 
prevents timed-out worker from overwriting fallback
   - [x] `ResilienceAsyncBulkheadTest` — async + bulkhead (with and without 
timeout)
   - [x] `ResilienceAsyncInvalidExecutorTest` — user-provided 
non-ScheduledExecutorService throws at startup
   - [x] All 65 existing + new tests pass (0 failures, 0 errors)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   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