Purge all messages from Azure Service Bus Queue

TarrantRo
AWS Tip
Published in
4 min readJul 31, 2021

--

As I’m using Azure Service Bus as message queue, I got a need to clean all messages from a queue, that includes dead letters. I searched a little from the internet and the solution is quite laborious(Using Service Bus Explorer or a .NET code). That’s the reason that I chose to do it myself by calling Service Bus API, I think that will be much easier for use case. And I wrote a script for automation as well.

Just to be clear, this task in only for Service Bus queue. I think these steps are useful and I will summarize them including the details. Of…

--

--

IT guy who love movies, Japanese manga. Have some experiences in Linux system, container/k8s, devops, cloud, etc.