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:
The message specified must exist.
Note: | Even if the message is locked by another reader due to the visibility timeout setting, it will still be deleted from the queue. |
| Name | Description | Type | Value |
|---|---|---|---|
MessageId
| Required. The ID of the message to delete. | String | The message ID returned from a
SendMessage
request. |
The following example DeleteMessage request shows how to delete a message from the queue.
<soap:Body wsu:Id="body"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<m:DeleteMessage xmlns:m="http://queue.amazonaws.com/doc/2006-01-01/">
<m:MessageIds>
<m:MessageId>
0SM9BGMW4EBDZMX7FXD1|04WQYHSQ39E6Y1K6EDFS|0QE42ST4KW7RK9HSY074
</m:MessageId>
</m:MessageIds>
</m:DeleteMessage>
</soap:Body>