cserwen opened a new issue #3443:
URL: https://github.com/apache/rocketmq/issues/3443
**BUG REPORT**
1. Please describe the issue you observed:
- What did you do (The steps to reproduce)?
use consumer to consumer msgs by pop model.
- What did you expect to see?
The following log is printed repeatedly which means messages of
`reviveTopic` are repeatedly consumed.
```
2021-10-29 15:51:12 INFO PopReviveService_0 - reviveQueueId=0,find ack,
offset:142765, raw :
{"ackOffset":283798,"consumerGroup":"pop-consumer-1","popTime":1635476075611,"queueId":0,"startOffset":283791,"topic":"%RETRY%pop-consumer-1_-topic"}
```
2. Please tell us about your environment:
Linux
3. Other information (e.g. detailed explanation, logs, related issues,
suggestions how to fix, etc):
- when popReviveService consumes the reviveTopic,it can't commit the consume
offset when the msg list doesn't have ck msg. The related code is line 365-371
in `PopReviveService.java`
- Besides,why `newOffset` was decided by ck msg ? IMO,it should be the real
offset which popReviveService consumed
```java
long newOffset = consumeReviveObj.oldOffset;
for (PopCheckPoint popCheckPoint : sortList) {
if (!checkAndSetMaster()) {
POP_LOGGER.info("slave skip ck process , revive topic={},
reviveQueueId={}", reviveTopic, queueId);
break;
}
if (consumeReviveObj.endTime - popCheckPoint.getReviveTime() <=
(PopAckConstants.ackTimeInterval + PopAckConstants.SECOND)) {
break;
}
// check normal topic, skip ck , if normal topic is not exist
String normalTopic =
KeyBuilder.parseNormalTopic(popCheckPoint.getTopic(), popCheckPoint.getCId());
if
(brokerController.getTopicConfigManager().selectTopicConfig(normalTopic) ==
null) {
POP_LOGGER.warn("reviveQueueId={},can not get normal topic {} , then
continue ", queueId, popCheckPoint.getTopic());
newOffset = popCheckPoint.getReviveOffset(); //Is this right?
continue;
}
if (null ==
brokerController.getSubscriptionGroupManager().findSubscriptionGroupConfig(popCheckPoint.getCId()))
{
POP_LOGGER.warn("reviveQueueId={},can not get cid {} , then continue
", queueId, popCheckPoint.getCId());
newOffset = popCheckPoint.getReviveOffset();
continue;
}
reviveMsgFromCk(popCheckPoint);
newOffset = popCheckPoint.getReviveOffset(); //and this line
}
```
--
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]