You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "Nowadays (via GitHub)" <gi...@apache.org> on 2023/08/02 13:55:45 UTC

[GitHub] [pulsar] Nowadays created a discussion: How to properly dispose of resources on a shared subscription with multi-node consumers

GitHub user Nowadays created a discussion: How to properly dispose of resources on a shared subscription with multi-node consumers

Given a topic with a shared subscription, consumed by different nodes.

How would I proceed to dispose of the topic/subscription (even if the backlog is not empty).

Forcing a topic deletion through the admin-api does not work as the topic and subscription get auto-recreated by the consumers.
This means I have to somehow instruct all the consumers to close before unsubscribing, but then, how to you dispose of the subscription and topic ?

Same thing with forcing unsubscribing via the admin-api, if a consumer is still connected it will recreate the subscription. Thus it also means I have to know when all consumers are closed before trying to unsubscribe.

Otherwise, I can call `unsubscribe` with the `force` parameter on each node but it does not feel like a proper solution. That means, each consumer will try to unsubscribe, then each consumer will try to delete the topic using the `force` parameter also to prevent exception because a consumer is still attached.

GitHub link: https://github.com/apache/pulsar/discussions/20920

----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org