From 7d0eea9aa6f5947fa0008e50fde66791963f1fc8 Mon Sep 17 00:00:00 2001 From: Tran Ngoc Nhan Date: Wed, 26 Mar 2025 20:56:52 +0700 Subject: [PATCH] Fix typo document (#3824) Signed-off-by: Tran Ngoc Nhan (cherry picked from commit f92f766146c9eb0c407d4d9a28fc71ddc2647a2a) --- .../pages/kafka/receiving-messages/listener-annotation.adoc | 4 ++-- .../kafka/receiving-messages/message-listener-container.adoc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/receiving-messages/listener-annotation.adoc b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/receiving-messages/listener-annotation.adoc index f719d178..e6602efa 100644 --- a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/receiving-messages/listener-annotation.adoc +++ b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/receiving-messages/listener-annotation.adoc @@ -247,7 +247,7 @@ public KafkaListenerContainerFactory batchFactory() { ConcurrentKafkaListenerContainerFactory factory = new ConcurrentKafkaListenerContainerFactory<>(); factory.setConsumerFactory(consumerFactory()); - factory.setBatchListener(true); // <<<<<<<<<<<<<<<<<<<<<<<<< + factory.setBatchListener(true); return factory; } ---- @@ -338,7 +338,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 `>` 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]] diff --git a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/receiving-messages/message-listener-container.adoc b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/receiving-messages/message-listener-container.adoc index f2e93156..9710e508 100644 --- a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/receiving-messages/message-listener-container.adoc +++ b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/receiving-messages/message-listener-container.adoc @@ -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.