From 54bfcf3ea4fd53ae15992b56ee8d1273458b1c49 Mon Sep 17 00:00:00 2001 From: Nasar Khan Date: Thu, 2 May 2024 16:20:07 -0400 Subject: [PATCH] retrieve kafka metadata method --- lib/manageiq/messaging/kafka/client.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/manageiq/messaging/kafka/client.rb b/lib/manageiq/messaging/kafka/client.rb index 77eccb5..f99f78a 100644 --- a/lib/manageiq/messaging/kafka/client.rb +++ b/lib/manageiq/messaging/kafka/client.rb @@ -65,8 +65,7 @@ def close # list all topics def topics - native_kafka = producer.instance_variable_get(:@native_kafka) - Rdkafka::Metadata.new(native_kafka).topics.collect { |topic| topic[:topic_name] } + kafka_client.admin.metadata.topics.map { |topic| topic[:topic_name] } end private