diff options
author | Dana Powers <dana.powers@rd.io> | 2015-06-09 09:39:29 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@rd.io> | 2015-06-11 23:24:30 -0700 |
commit | 513f210ba347adb083108b12a32dca5a4931fe21 (patch) | |
tree | efe7e651ae624be2f1867884081a2ffe02c2182f /kafka/client.py | |
parent | 47bc6a70953980cdf40caa2a4a127ae426d39bb1 (diff) | |
download | kafka-python-513f210ba347adb083108b12a32dca5a4931fe21.tar.gz |
Add KafkaClient.topics property to get list of known topics
Diffstat (limited to 'kafka/client.py')
-rw-r--r-- | kafka/client.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kafka/client.py b/kafka/client.py index 1bd8587..cf29eda 100644 --- a/kafka/client.py +++ b/kafka/client.py @@ -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() |