Failsafe Java Library

repository·master·Indexed 26 days ago

https://github.com/failsafe-lib/failsafe

A lightweight, zero-dependency Java 8+ library for handling failures. It provides a concise API for implementing resilience patterns including Retry, CircuitBreaker, RateLimiter, Timeout, Bulkhead, and Fallback, with available integration modules for OkHttp and Retrofit.

Tokens
176
Snippets
0
Records
1
Agent score
38%

What's inside Failsafe

  1. Overview of Failsafe resilience policies

    master

    Failsafe is a lightweight, zero-dependency Java 8+ library designed to handle failures by wrapping executable logic with resilience policies. These policies can be combined and composed to manage different failure scenarios.

    Core policies include:

    • Retry: Automatically retries failed executions.
    • CircuitBreaker: Prevents calls to a failing service to allow it to recover.
    • RateLimiter: Limits the rate of executions.
    • Timeout: Enforces a time limit on executions.
    • Bulkhead: Limits the number of concurrent executions.
    • Fallback: Provides an alternative execution path when a failure occurs.

    Additional integration modules are available for OkHttp and Retrofit.