tencent cloud


Querying Dead Letter Message

Last updated: 2023-03-14 15:27:54


    A dead letter queue is a special type of message queue used to centrally process messages that cannot be consumed normally. If a message cannot be consumed after a specified number of retries, TDMQ for RocketMQ will determine that the message cannot be consumed under the current situation and deliver it to the dead letter queue.
    In actual scenarios, messages may not be consumed due to service downtime or network disconnection. In this case, they will not be discarded immediately; instead, they will be persisted by the dead letter queue. After fixing the problem, you can create a consumer subscription to the dead letter queue to process such messages.

    Query Limit

    You can only query messages in the last three days.


    After a message is delivered to the dead letter queue, it will not be consumed normally. You can query messages in the last 3 days. Therefore, we recommend you process dead letter messages within 3 days after generation; otherwise, they will be deleted.
    All dead letter messages generated by all topics in a group are put into a dead letter queue and can be queried from there. The dead letter queue won't exist if there are no dead letter messages.


    1. Log in to the TDMQ for RocketMQ console and click Message Query on the left sidebar.
    2. On the Message Query page, select a region and enter the query conditions as prompted.
    Time Range: Select the time range for query, which can be the last 30 minutes, last hour, last 6 hours, last 24 hours, last 3 days, or a custom time range.
    Current Cluster: Select the cluster where the dead letter message you want to query is located.
    Namespace: Select the namespace where the dead letter message you want to query is located.
    Group: Select the group where the dead letter message you want to query is located.
    Message ID: It is optional.
    If you don't enter the message ID, a fuzzy query will be performed, which will batch query all dead letter messages by group ID in the selected time range.
    If you enter the message ID, an exact query will be performed, which will locate the message by group ID and message ID.
    3. Click Query, and the paginated results will be displayed in the list.
    4. You can select multiple dead letter messages and click Batch Resend Messages in the top-left corner to batch resend them to the retry queue of the original queue. You can also click Resend Message in the Operation column of a specific dead letter message to resend it. After the dead letter message is resent, it will be delivered to the retry queue of the original queue; however, it will not be deleted immediately from the dead letter queue; instead, it will be deleted at the end of the message lifecycle (3 days).
    5. Click View Details in the Operation column of the target message to view its basic information, content (message body), and parameters.
    6. Click View Message Trace in the Operation column or select the Message Trace tab on the details page to view the trace of the message. For more information, see Message Trace Description.
    You can see that after the dead letter message is redelivered, the consumption status changes to Redelivered to retry queue.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support