# spring-projects/spring-retry

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/spring-projects-spring-retry).**

2,268 stars · 532 forks · Java

## Links

- GitHub: https://github.com/spring-projects/spring-retry
- awesome-repositories: https://awesome-repositories.com/repository/spring-projects-spring-retry.md

## Description

Spring Retry is a Java library that provides exception handling, automated operation reattempts, backoff strategies, and recovery mechanisms for application workflows. It handles transient operation failures through declarative annotations, programmatic templates, stateful context storage, and fallback recovery paths.

The library controls retry behavior by specifying attempt counts, timeouts, and inclusion or exclusion rules for specific exception types. It pauses execution between attempts using fixed, exponential, or randomized backoff intervals, and caches retry state outside the call stack to manage transactional resources and database rollbacks. 

Telemetry integrations capture retry lifecycle events through listeners and expose execution metrics, performance timers, and failure counters. The framework also integrates with Spring Boot applications to configure automated retry logic and recovery handlers.

## Tags

### Part of an Awesome List

- [Java Libraries](https://awesome-repositories.com/f/awesome-lists/devtools/java-libraries.md) — Provides a Java library for handling transient operation failures through automated reattempts and fallback paths.

### DevOps & Infrastructure

- [Configurable Retry Engines](https://awesome-repositories.com/f/devops-infrastructure/api-service-management/api-resilience/request-retries/configurable-retry-engines/configurable-retry-engines.md) — Applies automated retry logic and recovery handlers to application methods using annotations. ([source](https://github.com/spring-projects/spring-retry#readme))
- [Transaction Retry Logic](https://awesome-repositories.com/f/devops-infrastructure/transaction-management/transaction-retry-logic.md) — Manages stateful retries for transactional resources and database operations requiring rollback handling.

### Programming Languages & Runtimes

- [Exponential Backoff Retries](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/background-task-management/background-task-retry-policies/asynchronous-task-retries/exponential-backoff-retries.md) — Pauses execution between attempts using fixed, exponential, or randomized intervals to give transient issues time to resolve. ([source](https://github.com/spring-projects/spring-retry#readme))
- [Retry Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/retry-libraries.md) — Provides declarative and imperative retry operations with backoff delays and recovery handlers.

### Software Engineering & Architecture

- [Exhausted Retry Fallbacks](https://awesome-repositories.com/f/software-engineering-architecture/error-handling/retry-policies/exhausted-retry-fallbacks.md) — Executes fallback processing paths automatically when all configured retry attempts fail. ([source](https://github.com/spring-projects/spring-retry#readme))
- [Transient Error Recovery Policies](https://awesome-repositories.com/f/software-engineering-architecture/fault-tolerance-strategies/fault-tolerance-implementation/transient-error-recovery-policies.md) — Applies backoff delays, exception filters, and fallback paths to resiliently recover from intermittent errors.
- [Retry Strategies](https://awesome-repositories.com/f/software-engineering-architecture/retry-strategies.md) — Invokes operations programmatically through strategy interfaces and templates that reattempt failed calls. ([source](https://github.com/spring-projects/spring-retry#readme))
- [Retry State Tracking](https://awesome-repositories.com/f/software-engineering-architecture/retry-state-tracking.md) — Caches retry state outside the call stack to safely handle failures involving transactional resources. ([source](https://github.com/spring-projects/spring-retry#readme))
- [Spring Boot Integrations](https://awesome-repositories.com/f/software-engineering-architecture/spring-boot-integrations.md) — Integrates with Spring Boot applications to configure automated retry logic and recovery handlers.
- [Workflow Exception Handling](https://awesome-repositories.com/f/software-engineering-architecture/workflow-exception-handling.md) — Provides a framework for managing failures in transactional workflows through retry limits and strategies.

### Development Tools & Productivity

- [Task Timeout and Retry Configurations](https://awesome-repositories.com/f/development-tools-productivity/task-timeout-management/task-timeout-and-retry-configurations.md) — Controls retry behavior by specifying maximum attempt counts, timeouts, and inclusion or exclusion rules. ([source](https://github.com/spring-projects/spring-retry#readme))
