Provides fault tolerance patterns for Spring Boot 3.x using Resilience4j. Use when implementing circuit breakers, handling service failures, adding retry logic with exponential backoff, configuring rate limiters, or protecting services from cascading failures. Generates circuit breaker, retry, rate limiter, bulkhead, time limiter, and fallback implementations. Validates resilience configurations through Actuator endpoints.
This skill provides fault-tolerance patterns for Spring Boot 3.x applications built on the Resilience4j library. It addresses the problem of cascading failures in distributed systems: when a downstream service becomes slow or unavailable, naive callers can exhaust threads and drag down the whole application. The skill guides an assistant to generate resilience configurations and annotated Java code that keep services responsive under partial failure.
It covers the full Resilience4j pattern set: circuit breakers (`@CircuitBreaker`) with fallback methods, retry with exponential backoff (`@Retry`), rate limiters (`@RateLimiter`), bulkheads for concurrency isolation, time limiters, and fallback implementations. The SKILL.md walks through Maven and Gradle dependency setup, AOP configuration, and `application.yml` tuning (sliding window size, failure-rate thresholds, wait durations, retry attempts). A configuration-reference file documents the complete option set, and a testing-patterns reference shows how to verify circuit-breaker state transitions, retry counts (using WireMock), rate-limit enforcement, and bulkhead rejection. Actuator endpoints are used to validate configured instances at runtime.
The target users are Java backend and microservices engineers using Spring Boot who need to harden inter-service calls, add retry logic to flaky integrations, or protect resources from overload. Typical use cases include wrapping payment or product API calls, adding graceful degradation via fallbacks, and building comprehensive resilience by combining multiple patterns on a single call path.
Spring Boot 3.x, using the resilience4j-spring-boot3 starter (version 2.2.0 is shown in the examples, with a note to use the latest stable version).
The Resilience4j Spring Boot 3 starter plus spring-boot-starter-aop (for annotation interception) and spring-boot-starter-actuator (for health indicators and validating configured instances).
Circuit breaker, retry with exponential backoff, rate limiter, bulkhead, time limiter, and fallback methods, applied via annotations and configured in application.yml.
The testing-patterns reference demonstrates @SpringBootTest cases for circuit-breaker state transitions, retry attempt counts with WireMock stubs, rate-limit rejection, and semaphore/thread-pool bulkhead limits.
No. It generates configuration and Java code and its examples call user-owned services; it does not perform destructive or credential-related actions.
Quick Setup:
.claude/skills/Repository
giuseppe-trisciuoglio/developer-kit