AndrewJSchofield commented on code in PR #19335:
URL: https://github.com/apache/kafka/pull/19335#discussion_r2022348467


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumerImpl.java:
##########
@@ -250,6 +251,7 @@ private enum AcknowledgementMode {
             this.log = logContext.logger(getClass());
 
             log.debug("Initializing the Kafka share consumer");
+            this.requestTimeoutMs = 
config.getInt(ConsumerConfig.REQUEST_TIMEOUT_MS_CONFIG);
             this.defaultApiTimeoutMs = 
config.getInt(ConsumerConfig.DEFAULT_API_TIMEOUT_MS_CONFIG);

Review Comment:
   It seems to me that `requestTimeoutMs` and `defaultApiTimeoutMs` ought to 
have the same data type. Please choose the best one and make them the same, 
which I have a feeling would be `int`.



##########
clients/src/main/java/org/apache/kafka/clients/consumer/KafkaShareConsumer.java:
##########
@@ -703,6 +703,12 @@ public void close() {
      * If the consumer is unable to complete acknowledgements and gracefully 
leave the group
      * before the timeout expires, the consumer is force closed. Note that 
{@link #wakeup()} cannot be
      * used to interrupt close.
+     * <p>
+     * The actual maximum wait time is bounded by the {@link 
ConsumerConfig#REQUEST_TIMEOUT_MS_CONFIG} setting, which
+     * only applies to operations performed with the broker 
(coordinator-related requests and
+     * fetch sessions). Even if a larger timeout is specified, the consumer 
will not wait longer than

Review Comment:
   nit: "fetch session" is not a thing for a share consumer. Maybe "operations 
performed with the broker, such as coordinator-related requests." would suffice.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to