MountainOne commented on issue #1588: Retry doesn't work when sending msg in 
aync mode(eg. when broker is down)
URL: https://github.com/apache/rocketmq/issues/1588#issuecomment-556006531
 
 
   If you modify it as you said, after the message is sent asynchronously, 
regardless of the result , the message will be resent in the for loop 
immediately, causing the message to be sent repeatedly. If the blocking waits 
during the sending process, it does not reflect the advantage of asynchronous 
sending, which affects performance.
   So I think the retry logic for asynchronous sent should still be in the 
callback function. You can consider canceling ` if (channel != null && 
channel.isActive())` and passing the logic that handle the exception to the 
callback function (which is actually done, such as `onExceptionImpl()`), so 
that every asynchronous call will be Triggered the callback function. But this 
solution is not elegant enough to directly modify the function of the remoting 
module, I am wondering if there is a better solution.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to