question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unsubscribe option for pulsar-client cli

See original GitHub issue

Is 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:closed
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
sbourkeostkcommented, Apr 15, 2020

@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:

  1. Users without access to the admin interface can unsubscribe
  2. Convenience - I suspect that a lot of users use 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?

0reactions
sbourkeostkcommented, Jul 28, 2020

@sijie sounds great - I was not aware of non-durable subscriptions until this discussion today.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found