This is an automated email from the ASF dual-hosted git repository.

dinglei pushed a commit to branch native
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git


The following commit(s) were added to refs/heads/native by this push:
     new feb011d  fix: ConsumerGroup cannot auto create (#194) (#258)
feb011d is described below

commit feb011de85595c035322b67765aae26540e36fbc
Author: wolftankk <[email protected]>
AuthorDate: Wed Oct 30 14:19:11 2019 +0800

    fix: ConsumerGroup cannot auto create (#194) (#258)
---
 consumer/push_consumer.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/consumer/push_consumer.go b/consumer/push_consumer.go
index 95f6280..c04fd4b 100644
--- a/consumer/push_consumer.go
+++ b/consumer/push_consumer.go
@@ -128,6 +128,9 @@ func (pc *pushConsumer) Start() error {
                        return
                }
 
+               pc.Rebalance()
+               time.Sleep(1 * time.Second)
+
                go func() {
                        // initial lock.
                        time.Sleep(1000 * time.Millisecond)
@@ -524,7 +527,7 @@ func (pc *pushConsumer) pullMessage(request *PullRequest) {
                        request.nextOffset = result.NextBeginOffset
                        pc.correctTagsOffset(request)
                case primitive.PullOffsetIllegal:
-                       rlog.Warnf("the pull request offset illegal, {} {}", 
request.String(), result.String())
+                       rlog.Warnf("the pull request offset illegal, request: 
%s, result: %s", request.String(), result.String())
                        request.nextOffset = result.NextBeginOffset
                        pq.dropped = true
                        go func() {

Reply via email to