MicroProfile Fault Tolerance defines an easy-to-use and flexible system for building resilient applications. Fault tolerance is about leveraging different strategies to guide the execution and result of some logic. Retry policies, bulkheads, and circuit breakers are popular concepts in this area. They dictate whether and when executions should take place, and fallbacks offer an alternative result when an execution does not complete successfully.
As mentioned above, the Fault Tolerance specification is to focus on the following aspects:
- Timeout: Define a duration for timeout
- Retry: Define a criteria on when to retry
- Fallback: provide an alternative solution for a failed execution.
- CircuitBreaker: offer a way of fail fast by automatically failing execution to prevent the system overloading and indefinite wait or timeout by the clients.
- Bulkhead: isolate failures in part of the system while the rest part of the system can still function.
As a consequence, this specification offers the following annotations:
- @Timeout
- @Retry
- @Fallback
- @CircuitBreaker
- @Bulkhead
- @Asynchronous
The main design is to separate execution logic from execution. The execution can be configured with fault tolerance policies, such as RetryPolicy, fallback, Bulkhead and CircuitBreaker.
Functional changes
A full list of changes delivered in the 4.1 release can be found at MicroProfile Fault Tolerance 4.1 Milestone.
Incompatible Changes
No.
API/SPI Changes
No.
Specification changes
- Work with MicroProfile Telemetry Metrics (#622)
Other Changes
-
- Removed unmanaged threads in TCK (#634)