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 2021/05/19 09:08:18 UTC

[GitHub] [rocketmq] xljnc opened a new issue #2909: 4.8.0版本的RocketMQ重试机制retryTimesWhenSendFailed和retryAnotherBrokerWhenNotStoreOK

xljnc opened a new issue #2909:
URL: https://github.com/apache/rocketmq/issues/2909


   按文档说的,配置了retryTimesWhenSendFailed,那消息发送失败的时候,会进行重试,
   DefaultMQProducerImpl的sendDefaultImpl方法中会根据这个配置计算重试次数。
   但是在调用sendKernelImpl获取到SendResult后,判断发送模式,为同步模式时,而且sendResult.getSendStatus() != SendStatus.SEND_OK,我的理解应该要进行重试,但是代码还要判断是否重试另一个broker
       if (this.defaultMQProducer.isRetryAnotherBrokerWhenNotStoreOK()) {
                                           continue;
                                       }
    return sendResult;
   这个配置默认为false,而且单broker的情况下也没有配置的意义(选择queue时)。相当于默认情况下,即便配置了重试次数,
   也不会进行重试?请问这是设计原因还是代码缺陷?


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



[GitHub] [rocketmq] panzhi33 commented on issue #2909: 4.8.0版本的RocketMQ重试机制retryTimesWhenSendFailed和retryAnotherBrokerWhenNotStoreOK

Posted by GitBox <gi...@apache.org>.
panzhi33 commented on issue #2909:
URL: https://github.com/apache/rocketmq/issues/2909#issuecomment-844706372


   org.apache.rocketmq.client.impl.MQClientAPIImpl#processSendResponse
   你可以看下这个方法,sendResult有值并且不为SendStatus.SEND_OK时,表面这组broker有问题,所以这里会选择判断。其它情况都是直接抛异常,不会走这段逻辑的
   


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



[GitHub] [rocketmq] duhenglucky closed issue #2909: 4.8.0版本的RocketMQ重试机制retryTimesWhenSendFailed和retryAnotherBrokerWhenNotStoreOK

Posted by GitBox <gi...@apache.org>.
duhenglucky closed issue #2909:
URL: https://github.com/apache/rocketmq/issues/2909


   


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



[GitHub] [rocketmq] duhenglucky commented on issue #2909: 4.8.0版本的RocketMQ重试机制retryTimesWhenSendFailed和retryAnotherBrokerWhenNotStoreOK

Posted by GitBox <gi...@apache.org>.
duhenglucky commented on issue #2909:
URL: https://github.com/apache/rocketmq/issues/2909#issuecomment-844714197


   @xljnc 这里你可以认为是一个故障隔离机制,尽量选择健康的broker 进行重试。


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