kirktrue commented on code in PR #15640: URL: https://github.com/apache/kafka/pull/15640#discussion_r1579733831
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java: ########## @@ -769,7 +730,8 @@ public void commitAsync(OffsetCommitCallback callback) { public void commitAsync(Map<TopicPartition, OffsetAndMetadata> offsets, OffsetCommitCallback callback) { acquireAndEnsureOpen(); try { - AsyncCommitEvent asyncCommitEvent = new AsyncCommitEvent(offsets); + Timer timer = time.timer(Long.MAX_VALUE); + AsyncCommitEvent asyncCommitEvent = new AsyncCommitEvent(offsets, timer); Review Comment: Yeah, I went back and forth on this a few times 😉 Ultimately I wanted to force the caller to be explicit about its timeout intention, vs. having it implicitly "hidden" away in the event hierarchy. Also, to create a `Timer` in the event constructor, we'd have to pass in a `Time` object (`time.timer(Long.MAX_VALUE)`), which seemed a bit obtuse, so 🤷♂️ -- 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