Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 299
Kev D. Avatar asked Sep 02 '25 09:09

Kev D.


2 Answers

There is a way in the portal .

  1. Navigate to the topic / subscription

  2. Set the mode to Receive enter image description here

  3. Then Click on Receive Messages and in the pop-up set the option as ReceiveAndDelete

enter image description here

  1. Repeat the process until the DLQ is clear enter image description here

Note : Observe the difference in the messages count between step 2 and step 4 ( shows the messages are deleted ) .

More on this mode here

like image 73
Rajesh Rajamani Avatar answered Sep 05 '25 00:09

Rajesh Rajamani


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

like image 25
Thili Avatar answered Sep 04 '25 23:09

Thili