Resends a dead-letter message with a specified message ID.

This operation enables consumers to attempt to consume the dead-letter message again.

Before you call this operation, the maximum number of retries for the dead-letter message has been reached. If the message still fails to be consumed after the message is resent, a message with the same message ID is added to the dead-letter queue. You can view the result of this operation on the Dead-Letter Queues page in the console or by calling the query API operations. You can calculate the number of messages with the same message ID to learn the number of times the message fails to be consumed after the message is resent.

  • A dead-letter message is a message that fails to be consumed after consumption retries are triggered by the retry logic. This indicates that the consumption logic may be erroneous. Therefore, you must identify the causes for the consumption failures before you call this operation to resend the message.
  • Message Queue for Apache RocketMQ does not manage the resending status of dead-letter messages. Therefore, dead-letter messages that are consumed after you resend them by calling this operation are not removed from the dead-letter queue. You must manually manage dead-letter messages and determine whether to resend a dead-letter message. This way, you do not need to repeatedly resend dead-letter messages that have been consumed.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes OnsDLQMessageResendById

The operation that you want to perform. Set the value to OnsDLQMessageResendById.

GroupId String Yes GID_test_group_id

The consumer group ID for the dead-letter message that you want to resend.

InstanceId String Yes MQ_INST_188077086902****_BXSuW61e

The ID of the Message Queue for Apache RocketMQ instance that corresponds to the message.

MsgId String Yes 0BC16699343051CD9F1D798E7734****

The message ID of the dead-letter message that you want to resend.

Response parameters

Parameter Type Example Description
Data List 0BC16699343051CD9F1D798E7734****

The ID of the dead-letter message that was resent.

RequestId String D94CC769-4DC3-4690-A868-9D0631B1****

The ID of the request.


Sample requests

http(s):// Action=OnsDLQMessageResendById
&<Common request parameters>

Sample success responses

XML format


JSON format

  "Data": [ ],
  "RequestId": "D94CC769-4DC3-4690-A868-9D0631B1****"

Error codes

For a list of error codes, visit the API Error Center.

Note If the message fails to be resent, the ID of the message is returned.