jovan-wong commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send URL: https://github.com/apache/rocketmq-client-cpp/pull/48#discussion_r244918606
########## File path: src/MQClientAPIImpl.cpp ########## @@ -411,13 +410,38 @@ void MQClientAPIImpl::sendMessageAsync(const string& addr, const MQMessage& msg, RemotingCommand& request, SendCallback* pSendCallback, - int64 timeoutMilliseconds) { + int64 timeoutMilliseconds, + int maxRetryTimes, + int retrySendTimes) { + int64 begin_time = UtilAll::currentTimeMillis(); //<!delete in future; - AsyncCallbackWrap* cbw = - new SendCallbackWrap(brokerName, msg, pSendCallback, this); - if (m_pRemotingClient->invokeAsync(addr, request, cbw, timeoutMilliseconds) == + AsyncCallbackWrap* cbw = new SendCallbackWrap(brokerName, msg, pSendCallback, this); + + LOG_DEBUG("sendMessageAsync request:%s, timeout:%lld, maxRetryTimes:%d retrySendTimes:%d", request.ToString().data(), timeoutMilliseconds, maxRetryTimes, retrySendTimes); + + if (m_pRemotingClient->invokeAsync(addr, request, cbw, timeoutMilliseconds, maxRetryTimes, retrySendTimes) == Review comment: ```c++ if (m_pRemotingClient->invokeAsync(addr, request, cbw, timeoutMilliseconds, maxRetryTimes, retrySendTimes)) {} ``` do not use `== false` for a boolean result according google code style. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services