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

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


The following commit(s) were added to refs/heads/master by this push:
     new f904a3f  [ISSUE #530] fix: initialize 0 for retry topic when 
ConsumeFromLastOffset
     new 9741974  Merge pull request #531 from xujianhai666/fix-apache-retry
f904a3f is described below

commit f904a3f82de1df8e0ebf1441b4ab028375306059
Author: zero.xu <[email protected]>
AuthorDate: Sun Sep 6 21:37:49 2020 +0800

    [ISSUE #530] fix: initialize 0 for retry topic when ConsumeFromLastOffset
---
 consumer/consumer.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/consumer/consumer.go b/consumer/consumer.go
index 3129b8d..0a2f6d0 100644
--- a/consumer/consumer.go
+++ b/consumer/consumer.go
@@ -754,7 +754,7 @@ func (dc *defaultConsumer) computePullFromWhere(mq 
*primitive.MessageQueue) int6
                case ConsumeFromLastOffset:
                        if lastOffset == -1 {
                                if strings.HasPrefix(mq.Topic, 
internal.RetryGroupTopicPrefix) {
-                                       lastOffset = 0
+                                       result = 0
                                } else {
                                        lastOffset, err := dc.queryMaxOffset(mq)
                                        if err == nil {

Reply via email to