Companion code for "Spring Framework 7's Built-in Resilience: @Retryable, @ConcurrencyLimit, and What's Left for Resilience4j". Every retry counted by recording real invocations: defaults, backoff and jitter, timeout, reactive and CompletableFuture returns, the concurrency limit's BLOCK and REJECT policies, retries around transactions, composition with Resilience4j 2.4.0, and the annotation API across 7.0.0-7.0.9. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01C3TETMrqVUWeFkNtz3Jbo3
23 lines
1.3 KiB
Plaintext
23 lines
1.3 KiB
Plaintext
# GET /demo/r4j/breaker (Spring Framework 7.0.9, Resilience4j 2.4.0, JDK 25)
|
|
# Source: src/main/java/com/ankurm/resilience/web/DemoController.java
|
|
|
|
{
|
|
"calls made": 11,
|
|
"calls that reached the downstream": 8,
|
|
"of which before the breaker opened": 5,
|
|
"outcomes": [
|
|
"1: TransientException: payment gateway 503 (call 1) [state after: CLOSED]",
|
|
"2: TransientException: payment gateway 503 (call 2) [state after: CLOSED]",
|
|
"3: TransientException: payment gateway 503 (call 3) [state after: CLOSED]",
|
|
"4: TransientException: payment gateway 503 (call 4) [state after: CLOSED]",
|
|
"5: TransientException: payment gateway 503 (call 5) [state after: OPEN]",
|
|
"6: CallNotPermittedException: CircuitBreaker 'payments' is OPEN and does not permit further calls [state after: OPEN]",
|
|
"7: CallNotPermittedException: CircuitBreaker 'payments' is OPEN and does not permit further calls [state after: OPEN]",
|
|
"8: CallNotPermittedException: CircuitBreaker 'payments' is OPEN and does not permit further calls [state after: OPEN]",
|
|
"-- 2.1 s later, downstream recovered --",
|
|
"9: returned charged [state after: HALF_OPEN]",
|
|
"10: returned charged [state after: CLOSED]",
|
|
"11: returned charged [state after: CLOSED]"
|
|
]
|
|
}
|