You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by ji...@apache.org on 2020/09/06 13:53:56 UTC
[rocketmq-client-go] branch master updated: [ISSUE #530] fix:
initialize 0 for retry topic when ConsumeFromLastOffset
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 <ze...@bytedance.com>
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 {