DeleteMessage (Query)

The DeleteMessage action removes the specified message from the queue. Messages stay in the queue until they are deleted with a DeleteMessage request.

DeleteMessage requests are validated on the following:

Note:

Even if the message is locked by another reader due to the visibility timeout setting, it will still be deleted from the queue.

Returns Success unless the MessageId is malformed.

NameDescriptionTypeValue
MessageIdRequired. The ID of the message to delete.StringA message ID value returned from a SendMessage request.

The following example DeleteMessage request shows how to delete a message from the queue.

This request never fails unless theMessageId is malformed. Even if there is no such MessageID, it returns success.