guyinyou commented on pull request #3555: URL: https://github.com/apache/rocketmq/pull/3555#issuecomment-1001560359
> > > > In the asynchronous sending mode, the sendCallBack function will be called back after the message fails to be sent, and it can be re-sent inside. > > > > > > > > > the code 'if (channel != null && channel.isActive()) ' return false, it direct throws RemotingConnectException > > > > > > I know what you mean, but if you increase the timesTotal in "for (; times < timesTotal; times++) , the number of retries will become retryTimesWhenSendAsyncFailed² times. Because in addition to the situation you described, there will be retryTimesWhenSendAsyncFailed retry attempts at "this.mQClientFactory.getMQClientAPIImpl().sendMessage" > > > > > In the asynchronous sending mode, the sendCallBack function will be called back after the message fails to be sent, and it can be re-sent inside. > > > > > > > > > the code 'if (channel != null && channel.isActive()) ' return false, it direct throws RemotingConnectException > > > > > > I know what you mean, but if you increase the timesTotal in "for (; times < timesTotal; times++) , the number of retries will become retryTimesWhenSendAsyncFailed² times. Because in addition to the situation you described, there will be retryTimesWhenSendAsyncFailed retry attempts at "this.mQClientFactory.getMQClientAPIImpl().sendMessage" > > No, after trying retryTimesWhenSendAsyncFailed times, it calls callback.onException method.  You are right. I looked at the code. Asynchronous sending will only go through the for loop when an exception is thrown. In other cases, it will only be executed once and return. -- 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]
