Skip to content

Commit 24d7cad

Browse files
tomazfernandesgaryrussell
authored andcommitted
GH-2139: Clarify ExponentialBackOff maxDelay default
The wording in `@BackOff`'s maxDelay property's javadoc is a bit ambiguous. Clarify its default behavior in the Retryable Topic's documentation.
1 parent ae80c5d commit 24d7cad

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Diff for: spring-kafka-docs/src/main/asciidoc/index.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:numbered:
66
:icons: font
77
:hide-uri-scheme:
8-
Gary Russell; Artem Bilan; Biju Kunjummen; Jay Bryant; Soby Chacko
8+
Gary Russell; Artem Bilan; Biju Kunjummen; Jay Bryant; Soby Chacko; Tomaz Fernandes
99

1010
ifdef::backend-html5[]
1111
*{project-version}*

Diff for: spring-kafka-docs/src/main/asciidoc/retrytopic.adoc

+6-3
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public RetryTopicConfiguration myRetryTopic(KafkaTemplate<String, MyPojo> templa
189189
----
190190
====
191191

192-
You can also provide a custom implementation of Spring Retry's `SleepingBackOffPolicy`:
192+
You can also provide a custom implementation of Spring Retry's `SleepingBackOffPolicy` interface:
193193

194194
====
195195
[source, java]
@@ -205,9 +205,12 @@ public RetryTopicConfiguration myRetryTopic(KafkaTemplate<String, MyPojo> templa
205205
----
206206
====
207207

208-
NOTE: The default backoff policy is FixedBackOffPolicy with a maximum of 3 attempts and 1000ms intervals.
208+
NOTE: The default backoff policy is `FixedBackOffPolicy` with a maximum of 3 attempts and 1000ms intervals.
209209

210-
IMPORTANT: The first attempt counts against the maxAttempts, so if you provide a maxAttempts value of 4 there'll be the original attempt plus 3 retries.
210+
NOTE: There is a 30-second default maximum delay for the `ExponentialBackOffPolicy`.
211+
If your back off policy requires delays with values bigger than that, adjust the maxDelay property accordingly.
212+
213+
IMPORTANT: The first attempt counts against `maxAttempts`, so if you provide a `maxAttempts` value of 4 there'll be the original attempt plus 3 retries.
211214

212215
===== Single Topic Fixed Delay Retries
213216

0 commit comments

Comments
 (0)