duhenglucky commented on a change in pull request #3555:
URL: https://github.com/apache/rocketmq/pull/3555#discussion_r775412260



##########
File path: 
client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java
##########
@@ -582,7 +582,7 @@ private SendResult sendDefaultImpl(
             MessageQueue mq = null;
             Exception exception = null;
             SendResult sendResult = null;
-            int timesTotal = communicationMode == CommunicationMode.SYNC ? 1 + 
this.defaultMQProducer.getRetryTimesWhenSendFailed() : 1;
+            int timesTotal = communicationMode == CommunicationMode.SYNC ? 1 + 
this.defaultMQProducer.getRetryTimesWhenSendFailed() : 1 + 
this.defaultMQProducer.getRetryTimesWhenSendAsyncFailed();

Review comment:
       This is indeed an issue that when there is a problem with the broker 
network, there will be no retry after the asynchronous sending fails, howerver, 
this change seems to result in too many retries, because the async retry logic 
is in the kernel method: 
_org.apache.rocketmq.client.impl.MQClientAPIImpl#sendMessageAsync_, so how 
about adding a try... catch arround the  _this.remotingClient.invokeAsync_ with 
an _onExceptionImpl_ exception resolve logic?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to