wolfstudy commented on a change in pull request #8327:
URL: https://github.com/apache/pulsar/pull/8327#discussion_r510554485



##########
File path: pulsar-function-go/pf/context.go
##########
@@ -119,6 +120,12 @@ func (c *FunctionContext) GetUserConfMap() 
map[string]interface{} {
        return c.userConfigs
 }
 
+// NewOutputMessage send message to the topic
+// @param topicName: The name of the topic for output message
+func (c *FunctionContext) NewOutputMessage(topicName string) pulsar.Producer {

Review comment:
       This is because Java client and Go client have different packaging for 
producer and message. In the Go client, they are independent structs; in the 
Java client, they are unified encapsulated into TypedMessageBuilder objects.
   
   But in fact, newOuputMessage essentially intercepts the link that sends 
messages to `outputTopic` during pulsar function processing. So we need to 
expose the producer to allow users to send messages out.




----------------------------------------------------------------
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]


Reply via email to