You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/01/04 01:00:44 UTC

[GitHub] jonnxu commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send

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

 ##########
 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:
   it a normal operation, also can use warning log to prominent

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services