Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Fault Tolerance configuration #12298

Merged
merged 1 commit into from
Sep 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 33 additions & 0 deletions docs/src/main/asciidoc/microprofile-fault-tolerance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,39 @@ To test this out, do the following:
5. Give it 5 seconds during which circuit breaker should close and you should be able to make two successful requests
again.

== Runtime configuration

You can override the annotations parameters at runtime inside your `application.properties` file.

If we take the retry example that we already saw:

[source,java]
----
package org.acme;

import org.eclipse.microprofile.faulttolerance.Retry;
...

public class CoffeeResource {
...
@GET
@Retry(maxRetries = 4)
public List<Coffee> coffees() {
...
}
...
}
----

We can override the `maxRetries` parameter with 6 retries instead of 4 by the following configuration item:
[source,properties]
----
org.acme.CoffeeResource/coffees/Retry/maxRetries=6
----

NOTE: The format is `fully-qualified-class-name/method-name/annotation-name/property-name=value`.
You can also configure a property for all the annotation via `annotation-name/property-name=value`.

== Conclusion

MicroProfile Fault Tolerance allows to improve resiliency of your application, without having an impact on the complexity
Expand Down