This is an automated email from the ASF dual-hosted git repository.
dinglei 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 c9ca891 [ISSUE #845] support standard json
c9ca891 is described below
commit c9ca891f548c91e50d8f5dac7c30ce77203ee50c
Author: yuz10 <[email protected]>
AuthorDate: Tue Aug 23 11:44:12 2022 +0800
[ISSUE #845] support standard json
[ISSUE #845] 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 7589484..e077b5f 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)
}
}