Uploaded image for project: 'Apache RocketMQ'
  1. Apache RocketMQ
  2. ROCKETMQ-196

sendMessageBack() will lost one retry message when slave prodvide consuming service

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 4.0.0-incubating, 4.1.0-incubating, 4.2.0
    • None
    • None

    Description

      sendMessageBack() will lost one retry message when slave prodvide
      consuming service. Need change retry message's delayLevel =
      (2+reconsumeTims).

      Normally, first retry message's deleylevel=3 and reconsumetimes=1, according to SendMessageProcessor.consumerSendMsgBack()(please check consumerSendMsgBack.png).
      But when master is down, send retry message will go to DefaultMQPushConsumerImpl.sendMessageBack() (please check sendMessageBack.png),

      the retry message's delaylevel=3 and reconsumetime=0 according to this statement:
      "newMsg.setDelayTimeLevel(3 + msg.getReconsumeTimes());"

      This will cause lose one retry message finally. Because generate DLQ or finish consuming according delaylevel.

      For DefaultMQPushConsumerImpl.sendMessageBack(),
      The logic should be changed to :
      "newMsg.setDelayTimeLevel(2 + msg.getReconsumeTimes());"

      Attachments

        1. consumerSendMsgBack.png
          61 kB
          lusong
        2. sendMessageBack.png
          99 kB
          lusong

        Activity

          People

            vintagewang Xiaorui Wang
            lusong lusong
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: