azure-service-bus icon indicating copy to clipboard operation
azure-service-bus copied to clipboard

Ability to purge a queue

Open jtaubensee opened this issue 7 years ago • 53 comments

From @SeanFeldman on December 20, 2016 5:25

There are scenarios where purging a queue is necessary

  • Testing scenarios
  • Removing all messages because they are no longer needed
  • Clearing out deferred messages when sequence numbers are no longer retained by an app

Similar functionality: ASQ`s CloudQueue.ClearAsync().

This would apply to both queue/subscription and associated DLQs.

Copied from original issue: Azure/azure-service-bus-dotnet#46

jtaubensee avatar Feb 27 '17 22:02 jtaubensee

This is something we can revisit in the future. We currently have an internal project that would make this much easier for us. The project will manage state against partitions.

jtaubensee avatar Feb 27 '17 22:02 jtaubensee

From @SeanFeldman on January 27, 2017 0:42

We currently have an internal project that would make this much easier for us.

Where's the OSS community in "us" when it's internal? Sharing is carrying, right? 😃

jtaubensee avatar Feb 27 '17 22:02 jtaubensee

The project I am referring to is for our cluster management. It will simplify transactions across shards, allowing us to better ensure that messages have been purged from all.

jtaubensee avatar Feb 27 '17 22:02 jtaubensee

Is this something that would be considered? Thank you.

SeanFeldman avatar Oct 02 '17 04:10 SeanFeldman

@SeanFeldman it's on our list. But it may take sometime for us to reach to that item. 😢

binzywu avatar Oct 05 '17 00:10 binzywu

@binzywu knowing it's planned is better than just wonder if it's even considered 🙂 Thank you.

SeanFeldman avatar Oct 05 '17 04:10 SeanFeldman

Just pinging for an update 🙂 Thank you.

SeanFeldman avatar Jan 17 '18 20:01 SeanFeldman

Any news on this?

ddobric avatar Nov 01 '18 10:11 ddobric

Still wish this functionality would exists...

SeanFeldman avatar Feb 11 '19 16:02 SeanFeldman

Still waiting for this!

tidusjar avatar Mar 14 '19 12:03 tidusjar

Two years and counting since this was opened, has there been any progress made?

lansal15 avatar Apr 09 '19 14:04 lansal15

I am trying to clean up some acceptance tests by deleting a topic and recreating it after each test fixture. In theory this should isolate the tests but I'm experiencing timing issues asking Azure to delete and create an entity in quick succession. I tried adding some logic using the Exists method on the Microsoft.Azure.ServiceBus.Management.ManagementClient - which would seem to indicate things are in a clean state, but this didn't work; possibly because things haven't fully materialised in Azure yet?

Maybe a less heavy handed approach and something like Clear or Purge would help me here. I am in need of a way to clean topics/queues/DLQs between tests

ben-burton avatar Jun 04 '19 08:06 ben-burton

Hi, is there an update on this? thanks

erickbp avatar Oct 22 '19 03:10 erickbp

Please consider implementing, needed in our case e.g. in the integration tests where we need to make sure the queue is empty before every new test runs.

Thank you

yahorsi avatar Jan 30 '20 12:01 yahorsi

@yahorsi if that helps, I do a "test run ID" header. Any message received with a different value that is set for the current test run is ignored. That way while there's no way to purge, your tests will be purging and running. Not perfect, but perhaps it would help in your case. Cheers.

SeanFeldman avatar Jan 30 '20 18:01 SeanFeldman

Not a month that someone doesn't ask how to purge a queue... If Queue Storage can do it, Service Bus should be able as well.

/cc @axisc

SeanFeldman avatar Aug 12 '20 00:08 SeanFeldman

I'm asking for a purge feature - during dev messages get messed up, and they have to be cleared before testing can begin again. Everybody writes their own utility to receive and dump the messages in the queue . Why is this such an issue to implement?

codeputer avatar Aug 12 '20 00:08 codeputer

Please consider implementing this feature. Thank you

old-profile avatar Aug 18 '20 09:08 old-profile

+1

lansal15 avatar Nov 14 '20 19:11 lansal15

+1

vinilneves avatar Jan 12 '21 23:01 vinilneves

+1

gitgandhi avatar Feb 08 '21 03:02 gitgandhi

+1 This feature would be extremely helpful

JGroot avatar Mar 22 '21 13:03 JGroot

+1

macalbert avatar Jun 01 '21 15:06 macalbert

+1

tgado avatar Aug 13 '21 19:08 tgado

+1

DavidBogues avatar Aug 28 '21 13:08 DavidBogues

+1

gabrielmsdiniz avatar Sep 15 '21 12:09 gabrielmsdiniz

plus one

sorinslavic avatar Nov 15 '21 12:11 sorinslavic

Hi, this has surfaced to the top of our backlog, and we hope to implement this in the coming months.

EldertGrootenboer avatar Feb 25 '22 01:02 EldertGrootenboer

this has surfaced to the top of our backlog, and we hope to implement this in the coming months.

I'm getting emotional reading this after so many years. Thank you.

SeanFeldman avatar Feb 25 '22 01:02 SeanFeldman

Any idea when this might go live?

priyankar-dutta avatar Apr 11 '22 14:04 priyankar-dutta