Dead-letter queue

Updated at:

A dead-letter queue in Simple Message Queue (formerly MNS) is used to store messages that consumers negatively acknowledge or that fail processing after multiple retries. This allows you to isolate and analyze problematic messages for troubleshooting.

Dead-letter policy

Dead-letter state

When a message's receive count exceeds the configured maximum receive count, the system moves it to the dead-letter queue.

Dead-letter message retention rules

  • A queue cannot be its own dead-letter queue.

  • The message retention period is not reset when a message moves to a dead-letter queue; the total retention time is the sum of the time spent in both the source and dead-letter queues.

Create a dead-letter queue

  1. Log on to the SMQ console.

  2. In the left-side navigation pane, choose Queue Model > Queues.

  3. In the top navigation bar, select a region.

  4. On the Queues page, click Create Queue.

  5. In the Create Queue panel, go to the Dead-letter Policy section. Turn on the Enable Dead-letter switch. Select a target queue to use as the Dead-letter Queue, set the Maximum Number of Times for Message Receiving, and then click OK.

    For information about other parameters, see Queue operations.