cserwen opened a new issue #3507:
URL: https://github.com/apache/rocketmq/issues/3507
**BUG REPORT**
1. Please describe the issue you observed:
- What did you do (The steps to reproduce)?
Produce msgs and consume by pop.
- What did you expect to see?
Message should be consumed successfully.
- What did you see instead?
Some messages entered the retry queue
2. Please tell us about your environment:
Linux
3. Other information (e.g. detailed explanation, logs, related issues,
suggestions how to fix, etc):
The reviveThread will consume msg in `reviveTopic` and cal a endTime for a
batch of msgs
```java
long deliverTime = MsgUtil.getMessageDeliverTime(this.brokerController,
messageExt);
if (deliverTime > endTime) {
endTime = deliverTime;
}
```
This value of endTime is bigger than actual because the storeTime of ck or
ack msgs is its delivery time. There is no need to calculate this value again.
When this value is bigger than actual. The below codes will think some ck
msgs should be revived.
```java
if (consumeReviveObj.endTime - popCheckPoint.getReviveTime() <=
(PopAckConstants.ackTimeInterval + PopAckConstants.SECOND)) {
break;
}
```
The picture below will be clearer:

The orange message should really be processed, but in fact the blue message
has also been processed.
--
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]