Home

resilience4jspringboot2

Resilience4j is a lightweight fault tolerance library for the Java platform designed to help developers build resilient, responsive applications. Inspired by Hystrix, resilience4j offers a family of pluggable patterns that can be applied to individual calls or entire services, with low overhead and minimal runtime dependencies.

Its design is modular: core components provide circuit breakers, retries, time limiters, bulkheads, and rate limiters

Usage is designed to be straightforward for plain Java and popular frameworks. Calls are wrapped with a

Resilience4j is open source under the Apache 2.0 license. It is actively developed, community-driven, and widely

as
separate
modules
(resilience4j-circuitbreaker,
resilience4j-retry,
resilience4j-timelimiter,
resilience4j-bulkhead,
resilience4j-ratelimiter).
Each
module
can
be
used
independently
or
composed
together
on
a
call
to
decorate
a
Supplier,
Callable,
or
CompletionStage.
The
circuit
breaker
tracks
failures
and
can
open
or
half-open
states;
the
retry
pattern
handles
transient
failures;
the
time
limiter
enforces
operation
deadlines;
the
bulkhead
limits
concurrent
calls;
the
rate
limiter
enforces
throughput
constraints.
The
library
also
supports
event
listeners
and
health
metrics.
decorator
and
executed
through
the
resilience
patterns,
and
results
or
exceptions
are
propagated
to
the
caller.
It
integrates
with
Spring
Boot
via
dedicated
starters
and
supports
metrics
reporting
through
Micrometer
or
other
monitoring
stacks.
adopted
in
microservice
architectures
as
an
alternative
to
heavier
resilience
tools,
offering
a
lightweight,
composable
approach
to
fault
tolerance.