Browse Source

Move NOTE in "Programmatic Retry Support" to correct location

pull/28225/merge
Sam Brannen 3 weeks ago
parent
commit
f1ca29b05d
  1. 6
      framework-docs/modules/ROOT/pages/core/resilience.adoc

6
framework-docs/modules/ROOT/pages/core/resilience.adoc

@ -183,9 +183,6 @@ By default, a retryable operation will be retried for any exception thrown: with @@ -183,9 +183,6 @@ By default, a retryable operation will be retried for any exception thrown: with
3 retry attempts (`maxRetries = 3`) after an initial failure, and a delay of 1 second
between attempts.
If you only need to customize the number of retry attempts, you can use the
`RetryPolicy.withMaxRetries()` factory method as demonstrated below.
[NOTE]
====
A retryable operation will be executed at least once and retried at most `maxRetries`
@ -196,6 +193,9 @@ For example, if `maxRetries` is set to `4`, the retryable operation will be invo @@ -196,6 +193,9 @@ For example, if `maxRetries` is set to `4`, the retryable operation will be invo
least once and at most 5 times.
====
If you only need to customize the number of retry attempts, you can use the
`RetryPolicy.withMaxRetries()` factory method as demonstrated below.
[source,java,indent=0,subs="verbatim,quotes"]
----
var retryTemplate = new RetryTemplate(RetryPolicy.withMaxRetries(4)); // <1>

Loading…
Cancel
Save