MicroProfile Fault Tolerance is a specification and annotation-based Java API for limiting the impact of failures in distributed microservices. In Quarkus, the quarkus-smallrye-fault-tolerance extension provides its implementation. section 10.5
Distributed failures can cascade through dependent services and bring down larger parts of a system. Declarative annotations keep resilience policies separate from business logic. section 10.5
Apply resilience policies to specific application operations:
- Retry repeats a failed operation a configured number of times before propagating the failure. section 10.5
- Fallback invokes an alternative operation when the primary operation fails. section 10.5
- Bulkhead limits concurrent invocations to prevent an operation from overloading the system. section 10.5
- Circuit breaker stops reattempting an operation after repeated failures and temporarily returns an error instead. section 10.5
- Timeout aborts operations that take too long, preventing the system from becoming stuck and unresponsive. section 10.5
These patterns mitigate failures in services that an application depends on. The API also has a programmatic SmallRye Fault Tolerance form, but the declarative annotation approach is the focus here. section 10.7 section 10.5
