massakam commented on a change in pull request #4811: [Issue: 3161][Go client]
Return Message ID for send
URL: https://github.com/apache/pulsar/pull/4811#discussion_r333960042
##
File path: pulsar-client-go/pulsar/producer.go
##
@@ -166,13 +166,26 @@ type Producer interface {
// This call will be blocking until is successfully acknowledged by the
Pulsar broker.
// Example:
// producer.Send(ctx, pulsar.ProducerMessage{ Payload: myPayload })
+ // @Deprecated
Send(context.Context, ProducerMessage) error
+ // Send a message
+ // This call will be blocking until is successfully acknowledged by the
Pulsar broker.
+ // Example:
+ // msgID, err := producer.SendAndGetMsgID(ctx, pulsar.ProducerMessage{
Payload: myPayload })
+ SendAndGetMsgID(context.Context, ProducerMessage) (MessageID, error)
+
// Send a message in asynchronous mode
// The callback will report back the message being published and
// the eventual error in publishing
+ // @Deprecated
SendAsync(context.Context, ProducerMessage, func(ProducerMessage,
error))
+ // Send a message in asynchronous mode
+ // The callback will report back the message being published and
+ // the eventual error in publishing
+ SendAsyncWithMsgID(context.Context, ProducerMessage, func(MessageID,
error))
Review comment:
I think this method should also be renamed like `SendAndGetMsgIDAsync`.
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:
us...@infra.apache.org
With regards,
Apache Git Services