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/02/26 07:53:04 UTC
[rocketmq-client-cpp] branch master updated: feat(orderly): add
sharding key in the message property (#260)
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-cpp.git
The following commit(s) were added to refs/heads/master by this push:
new 9265ba4 feat(orderly): add sharding key in the message property (#260)
9265ba4 is described below
commit 9265ba4dd23c2c743d23f6a2d8354a5f7f037e1f
Author: dinglei <li...@163.com>
AuthorDate: Wed Feb 26 15:52:54 2020 +0800
feat(orderly): add sharding key in the message property (#260)
---
src/extern/CProducer.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/extern/CProducer.cpp b/src/extern/CProducer.cpp
index a0c3698..5310df8 100644
--- a/src/extern/CProducer.cpp
+++ b/src/extern/CProducer.cpp
@@ -558,6 +558,9 @@ int SendMessageOrderlyByShardingKey(CProducer* producer, CMessage* msg, const ch
}
DefaultProducer* defaultMQProducer = (DefaultProducer*)producer;
MQMessage* message = (MQMessage*)msg;
+
+ string sKey(shardingKey);
+ message->setProperty("__SHARDINGKEY", sKey);
try {
// Constructing SelectMessageQueue objects through function pointer callback
int retryTimes = 3;