Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [microprofile-dev] Question about priority order of Fault Tolerance annotations.

Hi Yoshio,

In the spec (https://download.eclipse.org/microprofile/microprofile-fault-tolerance-2.1/microprofile-fault-tolerance-spec.html), each section has a paragraph on the invocation when using multiple FT annotations. See https://download.eclipse.org/microprofile/microprofile-fault-tolerance-2.1/microprofile-fault-tolerance-spec.html#timeout


However I couldn't understand the priority between the above three
annotations(@Timeout, @Retry and @CircuitBreaker).

Each Retry might trigger TimeOut and might count towards CircuitBreaker.
Spec says:
If @Retry is used with @CircuitBreaker, each retry attempt is processed by the circuit breaker and recorded as either a success or a failure. If a CircuitBreakerOpenException is thrown, the execution may be retried, depending on how the @Retry is configured.

If @Timeout is used with @Retry, a TimeoutException may trigger a retry, depending on the values of retryOn and abortOn of the @Retry annotation. The timeout is restarted for each retry. If @Asynchronous is also used and the retry is the result of a TimeoutException, the retry starts after any delay period, even if the original attempt is still running.

If @Timeout is used with @CircuitBreaker, a TimeoutException may be counted as a failure by the circuit breaker and contribute towards opening the circuit, depending on the value of failOn on the @CircuitBreaker annotation.

 Please feel free to raise an issue (https://github.com/eclipse/microprofile-fault-tolerance) on Fault Tolerance repo if you think the spec is unclear.

Thanks
Emily


 

On Wed, Mar 18, 2020 at 10:48 PM Yoshio Terada <tyoshio2002@xxxxxxxxxxx> wrote:
Dear my all friends.

I would like to ask you one question about MicroProfile Fault Tolerance.
Now I'm creating the explanation by Japanese as follows.
https://dev.to/azure/microprofile-fault-tolerance-1a6g

In fact, there is some annotations for Fault Tolerance and it is useful.

According to the specification, "@Fallback" will be invoke after all of
the evaluation of other annotations like @Timeout, @Retry and
@CircuitBreaker.

However I couldn't understand the priority between the above three
annotations(@Timeout, @Retry and @CircuitBreaker).

Is there a priority of the above three annotations?
Or will it be evaluated individual by parallel?

If it is possible, could you let me know the specification of the
priority order between the three annotations?

Thank you so much & Best Regards.

Yoshio.

_______________________________________________
microprofile-dev mailing list
microprofile-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/microprofile-dev


--
Thanks
Emily


Back to the top