From cc6e8bbb22dc592224757d96579867c58b975803 Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Sun, 8 Feb 2015 21:35:16 -0800 Subject: [PATCH] Always return sorted partition ids in KafkaClient.get_partition_ids_for_topic() --- kafka/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kafka/client.py b/kafka/client.py index 7b04e71..f8fe555 100644 --- a/kafka/client.py +++ b/kafka/client.py @@ -261,7 +261,7 @@ class KafkaClient(object): if topic not in self.topic_partitions: return None - return list(self.topic_partitions[topic]) + return sorted(list(self.topic_partitions[topic])) def ensure_topic_exists(self, topic, timeout = 30): start_time = time.time()