kafka/clients
Genseric Ghiro 872647fe06
KAFKA-19585: Avoid noisy NPE logs when closing consumer after constructor failures (#20491)
If there's a failure in the kafka consumer constructor, we attempt to
close it

2329def2ff/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java (L540)
In that case, it could be the case that some components may have not
been created, so we should consider some null checks to avoid noisy logs
about NPE.

This noisy logs have been reported with the console share consumer in a
similar scenario, so this task is to review and do a similar fix for the
Async if needed.

The fix is to check if handlers/invokers are null before trying to close
them. Similar to what was done here
https://github.com/apache/kafka/pull/20290

Reviewers: TengYao Chi <frankvicky@apache.org>, Lianet Magrans
 <lmagrans@confluent.io>
2025-09-08 13:51:57 -04:00
..
clients-integration-tests/src/test KAFKA-19259: Async consumer fetch intermittent delays on console consumer (#19980) 2025-09-05 10:50:47 -04:00
src KAFKA-19585: Avoid noisy NPE logs when closing consumer after constructor failures (#20491) 2025-09-08 13:51:57 -04:00
.gitignore