ReceiptHandle
obtained after the last consumption as a parameter to locate the messages to be deleted.NextVisibleTime
. After NextVisibleTime
elapses, the message will return to the Active
status, and ReceiptHandle
will become invalid, making it impossible to delete the message. In this case, the message needs to be consumed again to get a new ReceiptHandle
. When a message is consumed by multiple consumers concurrently, if the message is deleted by one of the consumers, other consumers can no longer get it.https://cmq-gz.publicXXX.tencenttdmq.com
http://gz.mqadapter.cmq.tencentyun.com
Parameter | Required | Type | Description |
queueName | Yes | String | Queue name, which must be unique under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter. |
receiptHandle.n | Yes | String | Message handler returned from the last consumption. For ease of use, n can start from either 0 or 1, but the values must be consecutive. For example, two messages to be deleted can be represented by receiptHandle.0,receiptHandle.1 or receiptHandle.1, receiptHandle.2 . |
Parameter | Type | Description |
code | Int | 0: Success. 4420: The QPS has reached the limit. 4440: The queue does not exist. 6010: Failed to delete some messages. 6020: Failed to delete all messages. For the descriptions of other returned values, see Common Error Codes. |
message | String | Error message. |
requestId | String | Request ID generated by the server, which can be submitted to the backend for troubleshooting when an internal server error occurs. |
errorList | Array | List of deletion failures. Each element indicates one message deletion failure and the cause. |
errorList
is defined as follows:Parameter | Type | Description |
code | Int | |
message | String | Error message. |
receiptHandle | String | Handler of the message failed to be deleted. |
https://domain/v2/index.php?Action=BatchDeleteMessage &queueName=test-queue-123 &receiptHandle.1=3423452345 &receiptHandle.1=4364564575 &<<a href="">Common request parameters</a>>
{"code" : 0,"message" : "","requestId":"14534664555"}
{"code" : 6010,"message" : "delete message partially failed","requestId":"14534664555","errorList":[{"code" : 4430,"message" : "invalid receiptHandle","receiptHandle":"4364564575"}]}
Was this page helpful?