Amazon Web ServicesAmazon SQS 消息队列 API
删除消息
使用接收句柄从队列中永久删除一条已接收消息。 官方英文详细说明: <p>Deletes the specified message from the specified queue. To select the message to delete, use the <code>ReceiptHandle</code> of the message (<i>not</i> the <code>MessageId</code> which you receive when you send the message). Amazon SQS can delete a message from a queue even if a visibility timeout setting causes the message to be locked by another consumer. Amazon SQS automatically deletes messages left in a queue longer than the retention period configured for the queue. </p> <note> <p>Each time you receive a message, meaning when a consumer retrieves a message from the queue, it comes with a unique <code>ReceiptHandle</code>. If you receive the same message more than once, you will get a different <code>ReceiptHandle</code> each time. When you want to delete a message using the <code>DeleteMessage</code> action, you must use the <code>ReceiptHandle</code> from the most recent time you received the message. If you use an old <code>ReceiptHandle</code>, the request will succeed, but the message might not be deleted. </p> <p>For standard queues, it is possible to receive a message even after you delete it. This might happen on rare occasions if one of the servers which stores a copy of the message is unavailable when you send the request to delete the message. The copy remains on the server and might be returned to you during a subsequent receive request. You should ensure that your application is idempotent, so that receiving a message more than once does not cause issues.</p> </note>
Amazon Simple Queue Service 的完整 23 个官方 action;保留 AWS JSON 1.0、AWS Query 兼容性、SigV4 与区域 Endpoint 规则。Hub 提供文档和本地 SDK/CLI,不代理队列调用。
请求
- operationId
DeleteMessage- 服务器
https://sqs.{Region}.{PartitionResult#dnsSuffix}- 认证
- awsSigV4
请求参数
无 URL、查询或 Header 参数。
Body 参数
string必填
响应
200
object
成功响应。
error
string
Declared service error
{}