Skip to content

Commit 36316c1

Browse files
author
Dana Powers
committed
Always use the initial partition list when hashing keys in KeyedProducer
1 parent fb03c69 commit 36316c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kafka/producer/keyed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def _next_partition(self, topic, key):
5454
self.partitioners[topic] = self.partitioner_class(self.client.get_partition_ids_for_topic(topic))
5555

5656
partitioner = self.partitioners[topic]
57-
return partitioner.partition(key, self.client.get_partition_ids_for_topic(topic))
57+
return partitioner.partition(key)
5858

5959
def send_messages(self,topic,key,*msg):
6060
partition = self._next_partition(topic, key)

0 commit comments

Comments
 (0)