I'm trying to figure out what would be the best way to remove all the messages from a Pulsar topic (either logically or physically), so that they are no longer consumable by subscriptions?
I know we can simply do $ pulsar-admin persistent delete persistent://tenant/namespace/topic
.
But, this solution has some drawbacks: it removes the topic completely (so we have to recreate it later) then there should be no active client connected to it (i.e: subscriptions or producers).
Alternatively is there a way to programmatically make all messages between two MessageId unavailable to the subscriptions ?
Thanks