Skip to content

Commit d614dad

Browse files
garyrussellartembilan
authored andcommitted
GH-1210: Javadoc/Doc Polishing
1 parent 5e45d04 commit d614dad

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

spring-kafka/src/main/java/org/springframework/kafka/support/Acknowledgment.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ public interface Acknowledgment {
3838
* Negatively acknowledge the current record - discard remaining records from the poll
3939
* and re-seek all partitions so that this record will be redelivered after the sleep
4040
* time. Must be called on the consumer thread.
41+
* <p>
42+
* <b>When using group management,
43+
* {@code sleep + time spent processing the previous messages from the poll} must be
44+
* less than the consumer {@code max.poll.interval.ms} property, to avoid a
45+
* rebalance.</b>
4146
* @param sleep the time to sleep.
4247
* @since 2.3
4348
*/
@@ -50,6 +55,10 @@ default void nack(long sleep) {
5055
* records before the index and re-seek the partitions so that the record at the index
5156
* and subsequent records will be redelivered after the sleep time. Must be called on
5257
* the consumer thread.
58+
* <p>
59+
* <b>When using group management,
60+
* {@code sleep + time spent processing the records before the index} must be less
61+
* than the consumer {@code max.poll.interval.ms} property, to avoid a rebalance.</b>
5362
* @param index the index of the failed record in the batch.
5463
* @param sleep the time to sleep.
5564
* @since 2.3

src/reference/asciidoc/kafka.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,8 @@ This is an improvement over the `SeekToCurrentBatchErrorHandler`, which can only
10101010

10111011
See <<seek-to-current>> for more information.
10121012

1013+
IMPORTANT: When using partition assignment via group management, it is important to ensure the `sleep` argument (plus the time spent processing records from the previous poll) is less than the consumer `max.poll.interval.ms` property.
1014+
10131015
[[container-auto-startup]]
10141016
====== Listener Container Auto Startup
10151017

0 commit comments

Comments
 (0)