From b2a6196aefa3c2008e44e7e2e1be0c8b9261b92b Mon Sep 17 00:00:00 2001 From: xianhualiu <122747878+xianhualiu@users.noreply.github.com> Date: Wed, 10 Apr 2024 09:26:00 -0400 Subject: [PATCH] Update sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java Co-authored-by: Jonathan Sabbagh <108473809+jbsabbagh@users.noreply.github.com> --- .../src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java b/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java index 90d93076a89a..d7f882c25f7c 100644 --- a/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java +++ b/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java @@ -1357,6 +1357,8 @@ public Read withBadRecordErrorHandler(ErrorHandler badRecord /** * Sets the timeout time for Kafka consumer polling request in the {@link ReadFromKafkaDoFn}. + * A lower timeout optimizes for latency. + * Increase the timeout if the consumer is not fetching enough (or any) records. * The default is 2 seconds. */ public Read withConsumerPollingTimeout(Duration duration) {