Skip to content

Commit edecea0

Browse files
committed
GH-2066: Polish Javadocs and UnsupOperationEx
1 parent 9f94417 commit edecea0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,16 @@ default void nack(Duration sleep) {
5252
}
5353

5454
/**
55-
* Acknowledge the record at an index in the batch - commit the offset(s) of records in the batch
56-
* up to and including the index. Requires {@link AckMode#MANUAL_IMMEDIATE}. The index must be
57-
* greater than any previous partial batch acknowledgment index.
55+
* Acknowledge the record at an index in the batch - commit the offset(s) of records
56+
* in the batch up to and including the index. Requires
57+
* {@link AckMode#MANUAL_IMMEDIATE}. The index must be greater than any previous
58+
* partial batch acknowledgment index for this batch and in the range of the record
59+
* list. This method must be called on the listener thread.
5860
* @param index the index of the record to acknowledge.
5961
* @since 3.0.10
6062
*/
6163
default void acknowledge(int index) {
62-
throw new UnsupportedOperationException("nack(sleep) is not supported by this Acknowledgment");
64+
throw new UnsupportedOperationException("ack(index) is not supported by this Acknowledgment");
6365
}
6466

6567
/**

0 commit comments

Comments
 (0)