Resubmit and Delete Dead-letter Messages of Queues and Topic Subscriptions
Tags: azure, serverless
Published: 2021-02-08 03:01:51

---
canonical_url: https://www.serverless360.com/blog/resubmit-delete-dead-letter-messages-queues-topic-subscriptions
---

[Azure Service Bus](https://www.serverless360.com/blog/resubmit-delete-dead-letter-messages-queues-topic-subscriptions) is used as a messaging service in many enterprises. Service Bus contains two types of messaging entities, Queues, and Topics.

##Queue

Queues transmit the messages in FIFO (First In, First Out) message delivery. Each message in a Queue can be received by only one active receiver.

##Topic

In contrast to the Queues, Topics may contain multiple Subscriptions, each Subscription resembles a Queue. So, the same message can be received from different Subscriptions of a Topic. Based on predefined Rules, the messages can be sent to different Subscriptions.

##Dead-letter

Service Bus Queues and Topic Subscriptions provides a secondary Sub-Queue, called a Dead-letter Queue (DLQ). This Dead-letter Sub-Queue is created at the time of entity creation. Dead-letter Queue holds the messages, which have any problem in processing. The messages in Dead-letter Queue can be removed by receiving it. There are certain reasons, why the messages move to Dead-letter Queue. They are,

1. HeaderSizeExceeded
2. TTLExpiredException
3. Session id is null
4. MaxTransferHopCountExceeded
5. Specified by application

For more detailed information on Dead-letter, refer Overview of [Service Bus Dead-letter Queues](For more detailed information on Dead-letter, refer Overview of Service Bus Dead-letter Queues).

[Serverless360](https://www.serverless360.com/signup) provides efficient capabilities to analyze volume of DLQ messages and provide a summary count of messages dead lettered due to various reasons, refer [Dead Letter Analytics](https://www.serverless360.com/blog/dead-letter-analytics-serverless360) using Serverless360 for more details

##Resubmit and Delete

Service Bus Explorer is the commonly known tool for managing Service Bus entities. [Even though it is very useful, it has limitations in handling the Dead-letter messages](https://www.serverless360.com/compare-service-bus-explorer). In this blog, Let us see how Serverless360 helps to handle dead letter messages in resubmission and delete scenario. To know more on how we built this capability, please read: [Serverless360 provides a reliable and safe solution for handling the Dead-letter messages](https://www.serverless360.com/blog/resubmit-delete-messages-azure-service-bus)

##Peeking Messages from Dead-letter Queue

After configuring Service Bus entities in Serverless360, the Operations section of Service Bus Queue or Topic Subscription provides the options to Resubmit or Delete the Dead-letter messages. The user can navigate to Operations section by clicking the entity path or Operations link.

![](https://www.serverless360.com/wp-content/uploads/2017/08/Queues.png)

The Operations section contains three different tabs for handling the main Queue messages and Dead-letter Queue messages.

![](https://www.serverless360.com/wp-content/uploads/2017/08/Dead-Letter.png)

##Messages

Messages from the active Queue can peek under the “Messages” tab. The User can only peek the messages from the active Queue. They cannot receive it. The messages can be retrieved by either specifying the “count” or specifying from “sequence number” along with “count”.

![](https://www.serverless360.com/wp-content/uploads/2017/08/Retreive-Messages.png)

##Dead-letter

The dead-letter tab provides the options to access the messages in Dead-letter Queue. The user can choose between two types of receive modes, Peek-Lock or Defer.

Resubmit and delete Azure Service bus dead-letter messages of Queues and Topic with [Serverless360](https://www.serverless360.com/signup).

##Peek-Lock

After retrieving the messages, User can filter the messages based on the Error Reason due to which the messages are moved to the Dead-letter Queue. The message body, properties and the reason for Dead-letter can be viewed using the context menu available for each message.

![](https://www.serverless360.com/wp-content/uploads/2017/08/peek-lock-dead-letter-messages.png)

##Defer

As discussed in [Resubmit and Delete Messages in Azure Service Bus Messaging](https://www.serverless360.com/blog/resubmit-delete-dead-letter-messages-queues-topic-subscriptions), receiving messages in Defer mode, changes the message status from Active to Defer. Therefore, the message cannot be removed from the Queue, without the sequence number of the message. Serverless360 allows the Users to Resubmit or Delete the messages received in Defer mode.

##Resubmit

Choosing the messages that need to be resubmitted and clicking RESUBMIT link provides the option to choose the destination entity. The destination entity may be a Queue or a Topic under the same namespace.

![](https://www.serverless360.com/wp-content/uploads/2017/08/resubmit-messages.png)

After choosing the destination entity, by clicking the PROCEED link, the messages get resubmitted to the selected entity and removed from the Dead-letter Queue. The status of the resubmission will be displayed with the required information.

![](https://www.serverless360.com/wp-content/uploads/2017/08/Successful-notification.png)

##Delete

Similarly, simply selecting the messages and clicking DELETE link deletes the selected messages.

##Audit

Serverless360 provides the [Governance and Audit](https://www.serverless360.com/blog/azure-governance-and-audit-feature-serverless360) logs for the Users. This feature can be used for the tracking of operations. Any user activity to resubmit or delete messages are tracked in this section.

Thus, we have a safe solution to handle the Dead-letter messages of Queues and Topic Subscriptions. In addition to this, Serverless360 provides a more advanced way of Resubmission and Deletion of messages by creating activities.