rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[Bug] Pop retry topics not cleaned up after deleting pop subscription

Open redlsz opened this issue 1 year ago • 6 comments

Before Creating the Bug Report

  • [x] I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • [X] I have searched the GitHub Issues and GitHub 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

centos7

RocketMQ version

5.1.0

JDK Version

JDK 8

Describe the Bug

In rocketmq 5.0 pop consume mode, retry topic will be created automatically by broker when consume failed and need retry. Every pop subscription has a retry topic named in format: "%RETRY%" + group + "_" + topic. But after deleting topic and group, pop retry topic has not been cleand up.

When responding client in PopMessageProcessor, retry message topic is set to original topic. So the pop retry topic is transparent to the client. image

The broker should keep close-loop pop retry topic resource management.

Steps to Reproduce

  1. Create a topic and send a few messages.
  2. Consume this topic in pop mode but not ack any messages.
  3. Keep runing for longer than pop invisible time, pop retry topic will be created.
  4. Stop consumption and delete topic and group.

What Did You Expect to See?

Pop retry topic will be cleaned up after deleting pop subscription.

What Did You See Instead?

The pop retry topic has not been cleaned up.

Additional Context

No response

redlsz avatar May 14 '23 05:05 redlsz

If confirmed, I can try to make a fix.

redlsz avatar May 14 '23 05:05 redlsz

@lizhanhui How we can solve this issue?

yp969803 avatar Dec 04 '23 09:12 yp969803

@yp969803 I believe @redlsz is right, it's a bug that should be fixed. Let me look into this issue

lizhanhui avatar Dec 04 '23 11:12 lizhanhui

If confirmed, I can try to make a fix.

@redlsz Sorry to respond so late, but if you still have time to create a fix. I would be very happy to review your pull request.

lizhanhui avatar Dec 04 '23 11:12 lizhanhui

@lizhanhui Can i work into it, can you guide me how can i do it

yp969803 avatar Dec 04 '23 11:12 yp969803

@lizhanhui Can i work into it, can you guide me how can i do it

@yp969803 Sure... and you are welcome to look into this issue and file a pull request to fix it

lizhanhui avatar Dec 06 '23 01:12 lizhanhui