You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/02/07 05:10:48 UTC

[GitHub] [pulsar] flowchartsman opened a new issue #9512: [Go Functions] NewOutputMessage API should probably be changed to Publish()

flowchartsman opened a new issue #9512:
URL: https://github.com/apache/pulsar/issues/9512


   The multi-dispatch functionality in Go Functions (as implemented with `NewOuputMessage()` in #8327) is a bit of an awkward API to use. For one, it returns a new Producer, not a new `OutputMessage` (in fact, the Go SDK does not have the concept of the message builder that is present in Java). For another, no customization of the producer is possible, so it seems unnecessary to have it returned at all.  I propose something like the Python SDK, allowing payload to be sent on an arbitrary topic, in conjunction with the caching of producers described in #9511. I think two methods would be most useful:
   
   ```go
   func (c *FunctionContext) Publish(topicName string, payload []byte) (pulsar.MessageID, error)
   func (c *FunctionContext) PublishMessage(topicName string, message *pulsar.ProducerMessage) (pulsar.MessageID, error)
   ```


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on issue #9512: [Go Functions] NewOutputMessage API should probably be changed to Publish()

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #9512:
URL: https://github.com/apache/pulsar/issues/9512#issuecomment-1058893382


   The issue had no activity for 30 days, mark with Stale label.


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

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org