This API (RewindQueue) is used for message rewind. For more information, please see Message Rewind.
Domain for public network API request: cmq-queue-region.api.qcloud.com
Domain for private network API request: cmq-queue-region.api.tencentyun.com
Note:
Whenever (including during alpha test) any public network downstream traffic is generated from the use of a public network domain, a fee will be charged. It is strongly recommended that users whose services are on the Tencent Cloud use private network domains, because no fee will be charged for the traffic consumed in the private network.
The following request parameter list only provides API request parameters. For other parameters, refer to Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
queueName | Yes | String | Queue name. This is unique under the same account in one region. The queue name is a string of no more than 64 characters, which can contain letters, numbers, and hyphens (-) and must begin with a letter. |
startConsumeTime | Yes | Unix timestamp | If this time is set, API (Batch) receiveMessage will consume messages after this timestamp based on the order of production messages. |
Parameter Name | Type | Description |
---|---|---|
code | Int | 0: Succeeded, others: Error. See the table below for specific errors. |
message | String | Error message. |
requestId | String | Request ID generated by server. When there is an internal error on the server, users can submit this ID to the backend to locate the problem. |
Error Code | Module Error Code | Error Message | Description |
---|---|---|---|
6050 | 10670 | your queue cannot be rewinded | Queue cannot be rewound. |
4000 | 10680 | invalid rewind time, you can get the vaild range of that via GetQueueAttributes | Invalid rewind time. You can view the queue attributes to get the correct rewind time. |
4000 | 10700 | rewindSeconds cannot be greater than msgRetentionSeconds | The rewind time cannot be greater than the message retention period. |
Note: The error codes listed in the above table are specific to this API. If the error code you are looking for is not in the table, you may find it in the Common Error Codes.
Input:
https://domain/v2/index.php?Action=RewindQueue &queueName=test-queue-123&startConsumeTime=unix timestamp &<Common request parameters>
Output:
{
"code" : 0,
"message" : "",
"requestId":"14534664555"
}
문제 해결에 도움이 되었나요?