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) {