Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

ISSUE-4824: Regex patten based topic consumers prevent topic deletion #335

Closed
sijie opened this issue Dec 27, 2019 · 0 comments
Closed

ISSUE-4824: Regex patten based topic consumers prevent topic deletion #335

sijie opened this issue Dec 27, 2019 · 0 comments

Comments

@sijie
Copy link
Member

sijie commented Dec 27, 2019

Original Issue: apache#4824


Describe the bug
I am using Java client libraries. I created a consumer using topicsPattern for a regex pattern. As new topics matching the pattern get created, the consumer starts consuming from it. This is expected. However, I delete a topic that the consumer is consuming (even with an -f option); the topic does not get deleted (looks like it gets re-created). This is NOT EXPECTED, and is a DEFECT.

To Reproduce
Steps to reproduce the behavior:

  1. Create a consumer using topicsPattern for a regex pattern say persistent://public/default/test.*
  2. Create producers to start sending messages to topics test01, test02, test03 etc.
  3. Once the consumer consumes the messages, stop producing to these topics
  4. Execute ./pulsar-admin topics list public/default and verify that these topics do exist.
  5. Execute ./pulsar-admin topics delete -f persistent://public/default/test02 to delete the topic.
  6. No errors are shown.
  7. However, execute ./pulsar-admin topics list public/default again and notice that test02 continues to exist.

Expected behavior
The system should allow deletion of topics even if regex pattern-based consumers have been attached to a topic.

Screenshots
NA

Desktop (please complete the following information):

  • Java

Additional context
This problem gains importance as we want some listeners to ALL topics matching a certain pattern. And we have strong business reasons for the topics to be ephemeral in nature (create on demand, and delete when the work for that named topic is over)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant