resilience-patterns

Configure Resilience4j circuit breaker, retry, bulkhead, rate limiter, and time limiter in Spring Boot.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/RogerioSobrinho/codeme-copilot --skill resilience-patterns-rogeriosobrinho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resilience-patterns
Source: https://github.com/RogerioSobrinho/codeme-copilot/tree/main/skills/resilience-patterns
Command: npx skills add https://github.com/RogerioSobrinho/codeme-copilot --skill resilience-patterns-rogeriosobrinho

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Resilience patterns for Spring Boot applications to prevent cascading failures and improve fault tolerance using Resilience4j.

Core Features & Use Cases

  • Circuit Breaker configuration
  • Retry
  • Bulkhead (concurrency limiter)
  • Rate Limiter
  • Time Limiter
  • WebClient Retry
  • Combining Patterns
  • Testing Circuit Breaker State
  • Guidance for production-grade integration and verification in Spring Boot services

Quick Start

Configure resilience4j in your Spring Boot project, annotate services with @CircuitBreaker, @Retry, @Bulkhead, @RateLimiter, and @TimeLimiter as needed, and run tests to validate circuit state transitions.

Frequently Asked Questions about resilience-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent cascading failures in Spring Boot services that call external dependencies?

To prevent cascading failures in Spring Boot, apply resilience patterns like circuit breakers and bulkheads using Resilience4j. This isolates faults and provides graceful degradation when external dependencies fail or become unresponsive.

How do I configure a circuit breaker and retry for WebClient calls in Spring Boot?

Configure circuit breaker and retry patterns for WebClient in Spring Boot by adding Resilience4j settings in application.yml and annotating service methods with @CircuitBreaker and @Retry to handle HTTP call failures automatically.

Can I combine multiple Resilience4j patterns like bulkhead, rate limiter, and time limiter together?

Yes, you can combine Resilience4j patterns like bulkhead, rate limiter, and time limiter in Spring Boot. The Skill provides specific guidance on stacking these annotations effectively for comprehensive fault tolerance.

How do I test circuit breaker state transitions in a Spring Boot application?

Test circuit breaker state transitions in Spring Boot by running tests that validate the Resilience4j circuit states. The Skill provides testing guidance to verify that your circuit opens, closed, and half-open states function correctly.

What is the best way to limit concurrency and prevent thread exhaustion in Spring Boot?

The best way to limit concurrency and prevent thread exhaustion in Spring Boot is using the Resilience4j bulkhead pattern. It restricts the number of concurrent calls to external dependencies, isolating faults.

Does Resilience4j require specific Spring Boot dependencies to implement time limiter patterns?

Implementing the time limiter pattern with Resilience4j requires adding the resilience4j dependencies to your Spring Boot project. You then configure the time limits in application.yml and apply the @TimeLimiter annotation.