unsubscribe option for pulsar-client cli
See original GitHub issueIs your feature request related to a problem? Please describe.
After running pulsar-client consume
the subscription is kept active and it is not possible to unsubscribe without using the admin interface.
Describe the solution you’d like The option to unsubscribe after consuming. eg: pulsar-client consume -s testsub --unsubscribe persistent://my/pulsar/topic
Describe alternatives you’ve considered Using pulsar-admin it’s possible to unsubscribe but this requires the user has access to the admin interface.
Additional context none
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Pulsar admin CLI
unsubscribe . Unsubscribe the given subscription on all destinations on a namespace. Usage. $ pulsar-admin namespaces unsubscribe tenant/namespace options.
Read more >Pulsar command-line tools - Apache Pulsar
All Pulsar command-line tools can be run from the bin directory of your installed ... pulsar-admin namespaces unsubscribe tenant/cluster/namespace options ...
Read more >Pulsar command-line tools - Apache Pulsar
All Pulsar command-line tools can be run from the bin directory of your installed ... pulsar-admin namespaces unsubscribe property/cluster/namespace options ...
Read more >Manage topics - Apache Pulsar
my-subscription: The name of this subscription. It is defined by the client. msgRateOut: The total rate of messages (msg/s) delivered on this subscription....
Read more >Pulsar admin CLI
Commands. broker-stats; brokers; clusters; functions; namespaces; ns-isolation- ... pulsar-admin namespaces unsubscribe tenant/cluster/namespace options.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sijie Yes, you can unsubscribe using the admin interface but that is not the same thing. Allowing the CLI client to unsubscribe itself has two main advantages:
pulsar-client consume
to check that messages are flowing on a topic and they do not intend the subscription to persist. On our Pulsar test cluster we often see backlogs on subscriptions that were started with the CLI and the user neglected to unsubscribe.Going further, I think it would be good practice to the CLI unsubscribe be default with an option to persist the subscription.
I know this would not be high priority but would you be opposed to a pull request for this feature if @315157973 or myself were willing to implement it?
@sijie sounds great - I was not aware of non-durable subscriptions until this discussion today.