You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/07/08 14:37:53 UTC
[GitHub] [rocketmq-client-go] xujianhai666 commented on a change in pull
request #103: [ISSUE #93] More usability API
xujianhai666 commented on a change in pull request #103: [ISSUE #93] More usability API
URL: https://github.com/apache/rocketmq-client-go/pull/103#discussion_r301129715
##########
File path: api.go
##########
@@ -19,37 +19,41 @@ package rocketmq
import (
"context"
-
+ "github.com/apache/rocketmq-client-go/consumer"
"github.com/apache/rocketmq-client-go/primitive"
+ "github.com/apache/rocketmq-client-go/producer"
)
type Producer interface {
Start() error
Shutdown() error
- SendSync(context.Context, ...*primitive.Message) (primitive.SendResult, error)
- SendAsync(context.Context, func(primitive.SendResult), ...*primitive.Message) error
- SendOneWay(context.Context, ...*primitive.Message) error
+ SendSync(context.Context, *primitive.Message) (*primitive.SendResult, error)
+ SendAsync(context.Context, func(context.Context, *primitive.SendResult), *primitive.Message) error
Review comment:
func(context.Context, *primitive.SendResult) -> func(context.Context, *primitive.SendResult, error) is better because of the error of the receiving message.
----------------------------------------------------------------
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
With regards,
Apache Git Services