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());"