xujianhai666 commented on a change in pull request #106: [ISSUE #105] Add
PullConsumer. resolve #105
URL: https://github.com/apache/rocketmq-client-go/pull/106#discussion_r301901521
##########
File path: consumer/pull_consumer.go
##########
@@ -19,40 +19,104 @@ package consumer
import (
"context"
- "errors"
"fmt"
- "strconv"
"sync"
+ "sync/atomic"
"github.com/apache/rocketmq-client-go/internal"
"github.com/apache/rocketmq-client-go/primitive"
+ "github.com/apache/rocketmq-client-go/rlog"
+ "github.com/pkg/errors"
+)
+
+var (
+ ErrMQEmpty = errors.New("MessageQueue is nil")
+ ErrOffset = errors.New("offset < 0")
+ ErrNumbers = errors.New("numbers < 0")
)
type PullConsumer interface {
Review comment:
@wenfengwang if do like that, we will introduce the problem "import cycle",
I put that in utils/errors.go.
----------------------------------------------------------------
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]
With regards,
Apache Git Services