AnandSinha opened a new issue #4824: Regex patten based topic consumers prevent 
topic deletion
URL: https://github.com/apache/pulsar/issues/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)
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to