apache / rocketmq-client-cpp

Apache RocketMQ cpp client
https://rocketmq.apache.org/
Apache License 2.0
366 stars 158 forks source link

the binary message body should be added to the signatures. #306

Closed ShannonDing closed 4 years ago

ShannonDing commented 4 years ago

in the src/common/ClientRPCHook.cpp,

  if (pBody && pBody->getSize() > 0) {
    const char* msg_body = const_cast<const char*>(static_cast<char*>(pBody->getData()));
    LOG_DEBUG("msgBody is:%s, msgBody length is:%d", msg_body, pBody->getSize());
    totalMsg.append(msg_body, pBody->getSize());
  } else if (request.getMsgBody().length() > 0) {
    LOG_DEBUG("msgBody is:%s, msgBody length is:" SIZET_FMT "", request.getMsgBody().c_str(),
              request.getMsgBody().length());
    totalMsg.append(request.getMsgBody());
  }

We should add the message body to signature as default.