confluentinc / librdkafka

The Apache Kafka C/C++ library
Other
7.37k stars 3.11k forks source link

query_watermark_offsets() Doesn't Return Authentication Failure Errors. #4656

Open UdithaIshan opened 3 months ago

UdithaIshan commented 3 months ago

Description

When the authentication password is incorrect query_watermark_offsets() returns "All broker connections are down" error instead of an authentication failed error.

Also noticed that, rd_kafka_topic_partition_list_query_leaders()function has below validation to return above "All broker connections are down" error when using query_watermark_offsets method.

if (rd_atomic32_get(&rk->rk_broker_up_cnt) == 0) return RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN;

How to reproduce

Try to query the watermark offsets after configuring sasl.password to incorrect one.

Checklist