lib/manageiq/messaging/kafka/client.rb in manageiq-messaging-1.4.2 vs lib/manageiq/messaging/kafka/client.rb in manageiq-messaging-1.4.3

- old
+ new

@@ -54,19 +54,22 @@ logger.warn("ack failed with error #{e.message}") raise unless e.message =~ /no_offset/ end def close + @admin&.close + @admin = nil + @producer&.close @producer = nil @consumer&.close @consumer = nil end # list all topics def topics - kafka_client.admin.metadata.topics.map { |topic| topic[:topic_name] } + admin.metadata.topics.map { |topic| topic[:topic_name] } end private attr_reader :kafka_client