[GitHub] [pulsar] massakam commented on a change in pull request #4811: [Issue: 3161][Go client] Return Message ID for send

2019-10-11 Thread GitBox
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


[GitHub] [pulsar] massakam commented on a change in pull request #4811: [Issue: 3161][Go client] Return Message ID for send

2019-08-27 Thread GitBox
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_r318006943
 
 

 ##
 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.SendWithMsgID(ctx, pulsar.ProducerMessage{ 
Payload: myPayload })
+   SendWithMsgID(context.Context, ProducerMessage) (MessageID, error)
 
 Review comment:
   From this method name, I get the impression that "Message ID is sent to 
broker with something" or "Something is sent to broker using message ID". What 
about a name like `SendAndGetMsgId`?


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