diff --git a/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java b/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java index b1d407ee4dc..772f973bc58 100644 --- a/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java +++ b/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java @@ -1459,12 +1459,7 @@ public class KafkaConsumer implements Consumer { */ @Override public void commitAsync(OffsetCommitCallback callback) { - acquireAndEnsureOpen(); - try { - commitAsync(subscriptions.allConsumed(), callback); - } finally { - release(); - } + commitAsync(subscriptions.allConsumed(), callback); } /**