You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by yu...@apache.org on 2022/06/16 14:11:39 UTC

[rocketmq-client-go] branch yuz10-patch-1 created (now f0ef089)

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

yuzhou pushed a change to branch yuz10-patch-1
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git


      at f0ef089  support standard json

This branch includes the following new commits:

     new f0ef089  support standard json

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[rocketmq-client-go] 01/01: support standard json

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuzhou pushed a commit to branch yuz10-patch-1
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git

commit f0ef089e1c02af305841dc7dd71592c3b2f49c62
Author: yuz10 <84...@qq.com>
AuthorDate: Thu Jun 16 22:11:35 2022 +0800

    support standard json
---
 internal/route.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/internal/route.go b/internal/route.go
index a101a61..715c64f 100644
--- a/internal/route.go
+++ b/internal/route.go
@@ -558,7 +558,8 @@ func (routeData *TopicRouteData) decode(data string) error {
 				if i < 0 {
 					continue
 				}
-				id, _ := strconv.ParseInt(str[0:i], 10, 64)
+				brokerId := strings.ReplaceAll(str[0:i], "\"", "")
+				id, _ := strconv.ParseInt(brokerId, 10, 64)
 				bd.BrokerAddresses[id] = strings.Replace(str[i+1:], "\"", "", -1)
 			}
 		}