Fault Tolerance 4.1
MicroProfile Fault Tolerance 2.1 was released just 2 weeks ago, and it didn’t take us long to fully implement. Today, we announce availability of SmallRye Fault Tolerance 4.1, a compliant implementation of MicroProfile Fault Tolerance 2.1. Here’s a list of the important changes in the specification:
-
The
@Retry.retryOn
andabortOn
attributes no longer ignoreThrowable.class
, to be consistent with other annotations that also specify exceptions. Only@Retry
had a requirement thatThrowable
is to be ignored. -
Related to the previous item is that the specification now admits that throwing custom
Throwable
s results in nonportable behavior. Fortunately, the use cases for throwing something that isn’t anException
(nor anError
) should be very rare. -
Also, the behavior was previously unspecified when the
@Retry.retryOn
andabortOn
attributes overlap. It is now specified that theabortOn
attribute "wins" overretryOn
. -
The
@CircuitBreaker.skipOn
attribute was added, to complement the existingfailOn
attribute. When the attributes overlap,skipOn
"wins" overfailOn
. -
The
@Fallback.applyOn
andskipOn
attributes were also added. When they overlap,skipOn
"wins" overapplyOn
. -
It is now specified that during the
@Asynchronous
method execution, the CDI request context is always active. The specification previously did not require that.
This release is also aligned with other SmallRye projects (Config and Metrics) that also recently released a new version in preparation of MicroProfile 3.3 platform release.
Enjoy the new SmallRye Fault Tolerance, it is coming in the next Quarkus release!