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_r245186911
 
 

 ##########
 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) ==
       false) {
-    LOG_ERROR("sendMessageAsync failed to addr:%s", addr.c_str());
+    LOG_WARN("invokeAsync failed to addr:%s,topic:%s, timeout:%lld, 
maxRetryTimes:%d, retrySendTimes:%d", 
 
 Review comment:
   If it's a normal op, this log will be printed everywhere.

----------------------------------------------------------------
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

Reply via email to