rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ding...@apache.org
Subject [rocketmq-client-go] branch native updated: fix: correct msgid (#449)
Date Wed, 18 Mar 2020 07:21:52 GMT
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 <52450794+xujianhai666@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


Mime
View raw message