sijie 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_r275094316
##########
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:
we are using the `partition_key` from the input message as the
`partition_key` for the output message. it doesn't seem to be correct to me.
any reason why you are setting this key here?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services