Introduction
SmallRye Fault Tolerance is comprised of the following main artifacts:
-
io.smallrye:smallrye-fault-tolerance-api
: public API for the features provided on top of MicroProfile Fault Tolerance; -
io.smallrye:smallrye-fault-tolerance-core
: core implementations of fault tolerance strategies; -
io.smallrye:smallrye-fault-tolerance
: CDI-based implementation of MicroProfile Fault Tolerance; -
io.smallrye:smallrye-fault-tolerance-autoconfig-core
: runtime part of the SmallRye Fault Tolerance configuration system.-
(There’s also
io.smallrye:smallrye-fault-tolerance-autoconfig-processor
, but that is only used during SmallRye Fault Tolerance build and isn’t required at runtime.)
-
These artifacts must be always present, together with the following dependencies:
-
Jakarta CDI, Annotations and Interceptors API;
-
org.eclipse.microprofile.fault-tolerance:microprofile-fault-tolerance-api
; -
org.eclipse.microprofile.config:microprofile-config-api
and some implementation; -
org.eclipse.microprofile.metrics:microprofile-metrics-api
and some implementation (implementation is only required if fault tolerance metrics are enabled); -
io.smallrye.reactive:smallrye-reactive-converter-api
; -
org.jboss.logging:jboss-logging
.
Some other artifacts are provided to facilitate additional integrations. These are described in the subsequent sections.
Most of the integration is performed automatically by the CDI Portable Extension present in SmallRye Fault Tolerance: io.smallrye.faulttolerance.FaultToleranceExtension
.
Make sure the extension is active.
The remaining integration concerns are described in the following sections:
-
providing a thread pool for
@Asynchronous
methods and other asynchronous tasks; -
enabling Context Propagation for
@Asynchronous
methods; -
enabling OpenTracing integration with Context Propagation;
-
integrating an event loop for non-blocking method invocations.