You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by di...@apache.org on 2020/03/18 07:21:52 UTC
[rocketmq-client-go] branch native updated: fix: correct msgid
(#449)
This is an automated email from the ASF dual-hosted git repository.
dinglei pushed a commit to branch native
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git
The following commit(s) were added to refs/heads/native by this push:
new e9d9ceb fix: correct msgid (#449)
e9d9ceb is described below
commit e9d9ceb45285bcf881a452b5e4ddf96df753f870
Author: xujianhai666 <52...@users.noreply.github.com>
AuthorDate: Wed Mar 18 15:21:42 2020 +0800
fix: correct msgid (#449)
Closes #446
---
internal/client.go | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/internal/client.go b/internal/client.go
index 6e04615..90c9b0c 100644
--- a/internal/client.go
+++ b/internal/client.go
@@ -547,6 +547,7 @@ func (c *rmqClient) ProcessSendResponse(brokerName string, cmd *remote.RemotingC
for i := 0; i < len(msgs); i++ {
msgIDs = append(msgIDs, msgs[i].GetProperty(primitive.PropertyUniqueClientMessageIdKeyIndex))
}
+ uniqueMsgId := strings.Join(msgIDs, ",")
regionId := cmd.ExtFields[primitive.PropertyMsgRegion]
trace := cmd.ExtFields[primitive.PropertyTraceSwitch]
@@ -559,7 +560,7 @@ func (c *rmqClient) ProcessSendResponse(brokerName string, cmd *remote.RemotingC
off, _ := strconv.ParseInt(cmd.ExtFields["queueOffset"], 10, 64)
resp.Status = status
- resp.MsgID = cmd.ExtFields["msgId"]
+ resp.MsgID = uniqueMsgId
resp.OffsetMsgID = cmd.ExtFields["msgId"]
resp.MessageQueue = &primitive.MessageQueue{
Topic: msgs[0].Topic,
@@ -567,7 +568,7 @@ func (c *rmqClient) ProcessSendResponse(brokerName string, cmd *remote.RemotingC
QueueId: qId,
}
resp.QueueOffset = off
- //TransactionID: sendResponse.TransactionId,
+ resp.TransactionID = cmd.ExtFields["transactionId"]
resp.RegionID = regionId
resp.TraceOn = trace != "" && trace != _TranceOff
return nil