resilience4cata 1.0.0 is on Maven Central. After four release candidates, it is the first stable release, and from now on compatibility is a written promise for the whole 1.x line.
What it is
resilience4cata is a resilience library for Java 21+:
retry, circuit breaker, rate limiter, timeout, bulkhead and fallback;
plus hedging and an adaptive concurrency limit.
You annotate an interface or a class:
public interface PriceClient {
@Retry ( maxAttempts = 3 , delay = "100ms" ) @CircuitBreaker ( name = "prices" ) @Timeout ( "2s" ) @Fallback ( method = "unknownPrice" ) BigDecimal price ( String sku ) throws IOException ;
default BigDecimal unknownPrice ( String sku , Exception failure ) { return BigDecimal . ZERO ; } }
Enter fullscreen mode
Exit fullscreen mode
At compile time, an annotation processor writes a plain Java class next to it, PriceClient$Resilient , that calls each policy directly. It needs no proxy, aspect or agent.…