wolfstudy commented on a change in pull request #8327:
URL: https://github.com/apache/pulsar/pull/8327#discussion_r511289613
##########
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:
Thanks @flowchartsman feedback. In fact, here we hope to expose the
*Producer* interface rather than the `producerMessage` struct. In this way,
users can use this interface to maximize their own behavior, including setting
`producerOptions` when creating a producer.
Again, `NewOutputMessage()` most fundamental purpose is to intercept the
results processed by the Pulsar Function, and then transfer the processing
power of this result to the user for customization.
----------------------------------------------------------------
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]