Search code examples
azureazureservicebusazure-servicebus-queues

How to delete/clear active/dead-letter messages from Azure Service Bus Queue?


Is there anyway to delete/clear either the active/dead-letter messages from Azure Service Bus Queue in Azure portal? Currently we've sent a couple of messages to our queue while both the active and some dead-letter messages holds up there for nothing, and our service bus subscriber didn't trigger somehow, so we'd like to delete these messages to make our queue clean again. In order to wait until service bus drop these messages after expiration period, could we manually remove them ourselves?


Solution

  • Using Service Bus Explorer you can connect to Azure Service Bus and administer messaging entities. You can download the tool here.

    Once you download the tool you run “ServiceBusExplorer.exe” In the Service Bus Explorer go to File Connect

    enter image description here

    Enter Connection string which you can find on in Dashboard --> Service Bus --> --> Shared access policies enter image description here

    After connected Successfully you will be able to see all the topics queues in the connected servicebus select the Queue that you wanted Access

    enter image description here

    You Can receive and delete as you wish

    enter image description here