DeleteMessage

The DeleteMessage action unconditionally removes the specified message from the specified queue. Even if the message is locked by another reader due to the visibility timeout setting, it is still deleted from the queue.

The following table lists the special request parameters the action uses (in addition to the common request parameters listed in Common Request Parameters).

NameDescriptionRequired

MessageId

The ID of the message to delete. The value must be a message ID value returned by a SendMessage request.

Type: String

Yes

The response contains no special elements besides the common elements listed in The Structure of a Response.

The request doesn't fail unless the MessageId is malformed. Even if the specified MessageID doesn't exist, the action returns Success.

The following example Query request deletes a message from the specified queue.