apache / apache/rocketmq-spring

How to understand ConsumeConcurrentlyStatus.RECONSUME_LATER

Open
#682 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.3k
Forks
943
PR merge metrics
No merged PRs in 30d

Description

My consume code is follows
`
public class HrConsumeListener implements MessageListenerConcurrently {
@Override
public ConsumeConcurrentlyStatus consumeMessage(List list, ConsumeConcurrentlyContext consumeConcurrentlyContext) {
try {
list.forEach(messageExt -> {
System.out.println(messageExt);
});
int i = 1/0;
return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
}catch (Exception e){
System.out.println("消费失败,offset不移动");
return ConsumeConcurrentlyStatus.RECONSUME_LATER;
}
}
}
`
When consum fails, consumOffset still moves,I don't think it should move,but why?
![AAORB}FO}(DOO`0)N~{ZIH7](https://github.com/user-attachments/assets/580597d1-fccb-49ba-8f5b-d512993f16af)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.