philipnee commented on code in PR #13303: URL: https://github.com/apache/kafka/pull/13303#discussion_r1127043244
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/PrototypeAsyncConsumer.java: ########## @@ -226,11 +246,20 @@ public void commitAsync(OffsetCommitCallback callback) { @Override public void commitAsync(Map<TopicPartition, OffsetAndMetadata> offsets, OffsetCommitCallback callback) { - final CommitApplicationEvent commitEvent = new CommitApplicationEvent(offsets); - commitEvent.future().whenComplete((r, t) -> { - callback.onComplete(offsets, new RuntimeException(t)); + CompletableFuture<Void> future = commit(offsets); + future.whenComplete((r, t) -> { + if (t != null) { + callback.onComplete(offsets, new RuntimeException(t)); Review Comment: You are right, it should've been a KafkaException. -- 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