merlimat commented on a change in pull request #1382: Correlate Output of 
function with input
URL: https://github.com/apache/incubator-pulsar/pull/1382#discussion_r174567157
 
 

 ##########
 File path: 
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
 ##########
 @@ -497,7 +493,9 @@ private void sendOutputMessage(InputMessage srcMsg,
                                    JavaExecutionResult result,
                                    byte[] output) {
         MessageBuilder msgBuilder = MessageBuilder.create()
-            .setContent(output);
+            .setContent(output)
+            .setProperty("__pfn_input_topic__", srcMsg.getTopicName())
+            .setProperty("__pfn_msg_id__", new 
String(Base64.getEncoder().encode(srcMsg.getActualMessage().getMessageId().toByteArray())));
 
 Review comment:
   Should this be more explicit it refers to the source message? 
   Like `__pfn_src_msg_id__` or `__pfn_input_msg_id__

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to