Skip to content

Commit 3ab9a42

Browse files
committed
Merge pull request #315 from dpkp/sorted_partition_ids
Always return sorted partition ids in client.get_partition_ids_for_topic()
2 parents f206a4b + cc6e8bb commit 3ab9a42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kafka/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def get_partition_ids_for_topic(self, topic):
261261
if topic not in self.topic_partitions:
262262
return None
263263

264-
return list(self.topic_partitions[topic])
264+
return sorted(list(self.topic_partitions[topic]))
265265

266266
def ensure_topic_exists(self, topic, timeout = 30):
267267
start_time = time.time()

0 commit comments

Comments
 (0)