jerrypeng commented on a change in pull request #4005: Set key for message when 
using function publish
URL: https://github.com/apache/pulsar/pull/4005#discussion_r275099458
 
 

 ##########
 File path: pulsar-functions/instance/src/main/python/python_instance.py
 ##########
 @@ -284,7 +284,7 @@ def process_result(self, output, msg):
 
       if output_bytes is not None:
         props = {"__pfn_input_topic__" : str(msg.topic), 
"__pfn_input_msg_id__" : base64ify(msg.message.message_id().serialize())}
-        self.producer.send_async(output_bytes, partial(self.done_producing, 
msg.consumer, msg.message, self.producer.topic()), properties=props)
+        self.producer.send_async(output_bytes, partial(self.done_producing, 
msg.consumer, msg.message, self.producer.topic()), properties=props, 
partition_key=msg.message.partition_key())
 
 Review comment:
   To be consistent with Java, but I will remove this for now

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to