liuyuan007 opened a new issue, #7182:
URL: https://github.com/apache/rocketmq/issues/7182

   ### Before Creating the Bug Report
   
   - [X] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [X] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq/discussions)  of this 
repository and believe that this is not a duplicate.
   
   - [X] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   
   ### Runtime platform environment
   
   OS:Mac os  or Linux
   
   
   ### RocketMQ version
   
   rocketmq-client:4.8.0及以上(自己用的4.8.0版本,最新版本也未看到相关解决代码)
   
   ### JDK Version
   
   JDK11
   
   ### Describe the Bug
   
   
集群模式,消费者在未完成某个消息消费时,发生下线或重启(优雅关机),且在消费代码存在业务异常的情况下;会出现消息offoffset上报服务端为:未消费(offset未后移),同时ConsumeMessageConcurrentlyService#processConsumeResult处理时又会发送一条sendMessageBack重试消息给服务端。
   这个时候就出现了重复消息了,在服务不断重启的情况下,重复消息成指数级(1,2,4,8,16,32...)增长。
   
   对源码加了System.out.println();打印
   截图1:更新远程offset
   
![image](https://github.com/apache/rocketmq/assets/30384521/51f2b536-5ded-46da-b344-e685ed2e2ba2)
   截图2:发送重复消息
   
![image](https://github.com/apache/rocketmq/assets/30384521/6fb13c86-a8ce-4948-9fc2-6577d8b7334a)
   完整log看附件。
   [异常分析.log](https://github.com/apache/rocketmq/files/12334047/default.log)
   
   
   
   ### Steps to Reproduce
   
   1、集群模式,消费者在未完成某个消息消费时,发生下线或重启(优雅关机),且在消费代码存在业务异常的情况下。
   复现代码见下图:
   
![image](https://github.com/apache/rocketmq/assets/30384521/3ca1a02f-19ea-469f-a97d-16a096d5b56e)
   
   
   ### What Did You Expect to See?
   
   1、offset更新为已消费,发送重试消息。
   2、或者:offset不更新,不发送重试消息。
   
   ### What Did You See Instead?
   
   暂时没有
   
   ### Additional Context
   
   _No response_


-- 
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]

Reply via email to