From dbc00ffa92c4552e7763cc4accc7af9e77a473c0 Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Wed, 27 May 2020 17:19:58 -0400 Subject: [PATCH] Docs changes for consumer batch.mode See https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/892\#issuecomment-631862705 --- docs/src/main/asciidoc/overview.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/main/asciidoc/overview.adoc b/docs/src/main/asciidoc/overview.adoc index aeac596aa..0237612cb 100644 --- a/docs/src/main/asciidoc/overview.adoc +++ b/docs/src/main/asciidoc/overview.adoc @@ -295,6 +295,8 @@ Starting with version 3.0, when `spring.cloud.stream.binding..consumer.bat Otherwise, the method will be called with one record at a time. The size of the batch is controlled by Kafka consumer properties `max.poll.records`, `min.fetch.bytes`, `fetch.max.wait.ms`; refer to the Kafka documentation for more information. +Bear in mind that batch mode is not supported with `@StreamListener` - it only works with the newer functional programming model. + IMPORTANT: Retry within the binder is not supported when using batch mode, so `maxAttempts` will be overridden to 1. You can configure a `SeekToCurrentBatchErrorHandler` (using a `ListenerContainerCustomizer`) to achieve similar functionality to retry in the binder. You can also use a manual `AckMode` and call `Ackowledgment.nack(index, sleep)` to commit the offsets for a partial batch and have the remaining records redelivered.