Add KafkaClient.topics property to get list of known topics
This commit is contained in:
@@ -306,6 +306,10 @@ class KafkaClient(object):
|
||||
|
||||
return sorted(list(self.topic_partitions[topic]))
|
||||
|
||||
@property
|
||||
def topics(self):
|
||||
return list(self.topic_partitions.keys())
|
||||
|
||||
def ensure_topic_exists(self, topic, timeout = 30):
|
||||
start_time = time.time()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user