DELETE on Message

The DELETE on Message 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 headers listed in Common REST Headers).

NameDescriptionRequired

MessageId

The ID of the message to delete. The value must be a message ID value returned from a PUT on MessageQueue 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 REST request deletes a message from the specified queue.

[Important]Important

When specifying a queue when using the REST API, make sure to omit http://queue.amazon.aws.com from the queue URL and provide only what's left (/A29E9WXPHGOG29/queue1 in the following example).

See DeleteMessage for sample response information.