The Redrive Message function needs to be used in conjunction with the Dead Letter Queue advanced Queue function.
When the user detects that some received Ressages are invalid and they do not want to receive these Messages again but also do not want to delete them, and the number of times these messages have been received has not yet reached the redrive policy setting, when receiving the number of times the user can choose to actively send these Messages to the dead-letter queue for subsequent analysis.
Send a message to the dead letter queue
The name of the Queue from which this message was received. The system defaults to only one redrive policy per Queue, so there is no need to specify the name of the dead letter queue
The receiptHandle of the Message to be sent to the dead letter queue
Send Messages to the dead letter queue in batches This operation is not atomic. Some Messages may be successfully deleted and some may fail.
The name of the Queue from which this message was received. The system defaults to only one redrive policy per Queue, so there is no need to specify the name of the dead letter queue
List of Messages to be sent to the dead letter queue DeadMessageBatchRequestEntry field includes:
Successful Message receiptHandle list
List of failed Message receiptHandles and corresponding abnormality The specific content of the MessageBatchErrorEntry can be found in sendMessageBatch()
Note: The dead letter queue cannot use deadMessage or deadMessageBatch.