candlerb opened a new issue #5554: pulsar-admin topics delete with multiple 
topics
URL: https://github.com/apache/pulsar/issues/5554
 
 
   **Is your feature request related to a problem? Please describe.**
   To clean up after running test suite, I have a bunch of old topics that need 
deleting.
   
   ```
   $ ../../bin/pulsar-admin topics list public/default
   
"persistent://public/default/my-python-test-producer-deduplication-1572861915.695249"
   "persistent://public/default/partitioned_topic_name_test-partition-1"
   "persistent://public/default/partitioned_topic_name_test-partition-2"
   "persistent://public/default/my-v2-topic-producer-consumer"
   "persistent://public/default/partitioned_topic_name_test-partition-0"
   "persistent://public/default/my-avro-python-topic"
   ... etc
   ```
   
   **Describe the solution you'd like**
   Option 1: Allow topic wildcard matches, like subscription wildcards
   
   ```
   $ ../../bin/pulsar-admin topics delete 'my-python-topic-*'
   10:11:46.858 [AsyncHttpClient-5-1] WARN  
org.apache.pulsar.client.admin.internal.BaseResource - 
[http://localhost:8080/admin/v2/persistent/public/default/my-python-topic-*?force=false]
 Failed to perform http delete request: javax.ws.rs.NotFoundException: HTTP 404 
Not Found
   ```
   
   Option 2: Allow `topics delete` to accept more than one topic on the command 
line.  Currently it enforces a single topic:
   
   ```
   $ ../../bin/pulsar-admin topics delete 
"persistent://public/default/my-python-topics-consumer-1-partition-0"  
"persistent://public/default/my-python-topics-consumer-3-partition-2" 
"persistent://public/default/my-python-topics-consumer-3-partition-3"
   Need to provide just 1 parameter
   ```
   
   **Describe alternatives you've considered**
   Very slow workaround (since pulsar-admin has 4-5 second Java startup 
overhead per invocation):
   
   ```
   ../../bin/pulsar-admin topics list public/default | sed 's/"//g' |
     while read a; do echo "$a"; ../../bin/pulsar-admin topics delete "$a"; done
   ```
   
   **Additional context**
   N/A

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to