summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kafka/producer/keyed.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/kafka/producer/keyed.py b/kafka/producer/keyed.py
index 473f70a..68c70d9 100644
--- a/kafka/producer/keyed.py
+++ b/kafka/producer/keyed.py
@@ -54,6 +54,10 @@ class KeyedProducer(Producer):
partitioner = self.partitioners[topic]
return partitioner.partition(key, self.client.get_partition_ids_for_topic(topic))
+ def send_messages(self,topic,key,*msg):
+ partition = self._next_partition(topic, key)
+ return self._send_messages(topic, partition, *msg,key=key)
+
def send(self, topic, key, msg):
partition = self._next_partition(topic, key)
return self._send_messages(topic, partition, msg, key=key)