Skip to content

Commit e962c8c

Browse files
Force auth when fetching Kafka metadata
1 parent 5079920 commit e962c8c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/consumer/base_consumer.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,10 @@ where
713713
topic: Option<&str>,
714714
timeout: T,
715715
) -> KafkaResult<Metadata> {
716-
self.client.fetch_metadata(topic, timeout)
716+
let to = timeout.into();
717+
// force credential retrieval
718+
self.client.poll_event(&self.queue, to);
719+
self.client.fetch_metadata(topic, to)
717720
}
718721

719722
fn fetch_watermarks<T: Into<Timeout>>(

0 commit comments

Comments
 (0)