how to delete dead-letter messages?

Chen, Cherie 0 Reputation points
2024-12-31T00:11:53.2133333+00:00

For the topic that has both active messages and dead-letter messages, I only want to delete the dead-letter messages.

If I purge messages based on this article https://learn.microsoft.com/en-us/azure/service-bus-messaging/batch-delete, will both messages be deleted?

Also, sometimes it asks for session ID, what should be the session id?

User's image

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
656 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 23,431 Reputation points Microsoft Employee
    2024-12-31T06:13:33+00:00

    @Chen, Cherie Thanks for posting your question in Microsoft Q&A, apologize for any inconvenience caused on this.

    • If you want to delete those dead letter messages from the service queue change the Queue to Receive Mode, select ReceiveAndDelete option and specify the maximum number of messages you want to receive and delete. This helps you to delete the dead letter message without passing any session Id's.

    User's image

    • Alternatively, if you want to delete all the dead-letter messages without specifying the maximum number of messages to be deleted then you can perform the same operation using Service bus explorer from local machine. Download the ServiceBus explorer exe from this GitHub Repo

    Hope this helps, let me know if you have any further questions on this.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.