From e962c8c64004f0e59b22adb7f009507a78347815 Mon Sep 17 00:00:00 2001 From: Andrei Ionescu Date: Wed, 7 Aug 2024 18:56:45 +0300 Subject: [PATCH] Force auth when fetching Kafka metadata --- src/consumer/base_consumer.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/consumer/base_consumer.rs b/src/consumer/base_consumer.rs index a25e36611..6096d8d21 100644 --- a/src/consumer/base_consumer.rs +++ b/src/consumer/base_consumer.rs @@ -713,7 +713,10 @@ where topic: Option<&str>, timeout: T, ) -> KafkaResult { - self.client.fetch_metadata(topic, timeout) + let to = timeout.into(); + // force credential retrieval + self.client.poll_event(&self.queue, to); + self.client.fetch_metadata(topic, to) } fn fetch_watermarks>(