Fix typo document (#3824)

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>

 **Auto-cherry-pick to `3.3.x` & `3.2.x`**
This commit is contained in:
Tran Ngoc Nhan
2025-03-26 20:56:52 +07:00
committed by GitHub
parent 5261dec07b
commit f92f766146
2 changed files with 3 additions and 3 deletions

View File

@@ -251,7 +251,7 @@ public KafkaListenerContainerFactory<?> batchFactory() {
ConcurrentKafkaListenerContainerFactory<Integer, String> factory =
new ConcurrentKafkaListenerContainerFactory<>();
factory.setConsumerFactory(consumerFactory());
factory.setBatchListener(true); // <<<<<<<<<<<<<<<<<<<<<<<<<
factory.setBatchListener(true);
return factory;
}
----
@@ -342,7 +342,7 @@ public void pollResults(ConsumerRecords<?, ?> records) {
----
IMPORTANT: If the container factory has a `RecordFilterStrategy` configured, it is ignored for `ConsumerRecords<?, ?>` listeners, with a `WARN` log message emitted.
Records can only be filtered with a batch listener if the `<List<?>>` form of listener is used.
Records can only be filtered with a batch listener if the `List<?>` form of listener is used.
By default, records are filtered one-at-a-time; starting with version 2.8, you can override `filterBatch` to filter the entire batch in one call.
[[annotation-properties]]

View File

@@ -16,7 +16,7 @@ Also, starting with version 2.7, there is now a `BatchInterceptor`, providing si
In addition, the `ConsumerAwareRecordInterceptor` (and `BatchInterceptor`) provide access to the `Consumer<?, ?>`.
This might be used, for example, to access the consumer metrics in the interceptor.
IMPORTANT: You should not execute any methods that affect the consumer's positions and or committed offsets in these interceptors; the container needs to manage such information.
IMPORTANT: You should not execute any methods that affect the consumer's positions and/or committed offsets in these interceptors; the container needs to manage such information.
IMPORTANT: If the interceptor mutates the record (by creating a new one), the `topic`, `partition`, and `offset` must remain the same to avoid unexpected side effects such as record loss.