flowchartsman commented on a change in pull request #8327:
URL: https://github.com/apache/pulsar/pull/8327#discussion_r511020456
##########
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:
Admittedly, there are certainly more idiomatic ways to handle some of
these concepts. I am generally against using global variables, especially maps
with no synchronization, but from what I can tell from the code all access to
this map would be synchronous, so no problems there, and more profound changes
to the Go functions SDK would require a PIP, which I'm certainly open to
submitting down the road.
----------------------------------------------------------------
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]