rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vongosl...@apache.org
Subject [rocketmq-client-go] branch master updated: Fix: FindBrokerAddrByName input parameter problem (#538)
Date Mon, 19 Oct 2020 12:07:43 GMT
This is an automated email from the ASF dual-hosted git repository.

vongosling 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 63954e4  Fix: FindBrokerAddrByName input parameter problem (#538)
63954e4 is described below

commit 63954e444d5aca1c4a160c403bf7cf5ce5e6e668
Author: xly0713 <xly880713@gmail.com>
AuthorDate: Mon Oct 19 20:07:29 2020 +0800

    Fix: FindBrokerAddrByName input parameter problem (#538)
    
    Co-authored-by: xiaoliaoyuan <xiaoliaoyuan@unicloud.com>
---
 consumer/consumer.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/consumer/consumer.go b/consumer/consumer.go
index 0a2f6d0..3504786 100644
--- a/consumer/consumer.go
+++ b/consumer/consumer.go
@@ -929,7 +929,7 @@ func (dc *defaultConsumer) queryMaxOffset(mq *primitive.MessageQueue)
(int64, er
 	brokerAddr := dc.namesrv.FindBrokerAddrByName(mq.BrokerName)
 	if brokerAddr == "" {
 		dc.namesrv.UpdateTopicRouteInfo(mq.Topic)
-		brokerAddr = dc.namesrv.FindBrokerAddrByName(mq.Topic)
+		brokerAddr = dc.namesrv.FindBrokerAddrByName(mq.BrokerName)
 	}
 	if brokerAddr == "" {
 		return -1, fmt.Errorf("the broker [%s] does not exist", mq.BrokerName)
@@ -958,7 +958,7 @@ func (dc *defaultConsumer) searchOffsetByTimestamp(mq *primitive.MessageQueue,
t
 	brokerAddr := dc.namesrv.FindBrokerAddrByName(mq.BrokerName)
 	if brokerAddr == "" {
 		dc.namesrv.UpdateTopicRouteInfo(mq.Topic)
-		brokerAddr = dc.namesrv.FindBrokerAddrByName(mq.Topic)
+		brokerAddr = dc.namesrv.FindBrokerAddrByName(mq.BrokerName)
 	}
 	if brokerAddr == "" {
 		return -1, fmt.Errorf("the broker [%s] does not exist", mq.BrokerName)


Mime
View raw message