Rewind queue

Last updated: 2020-06-08 16:34:33


    This is a legacy API which has been hidden and will no longer be updated. We recommend using the new CMQ API 3.0 which is standardized and faster.

    Interface description

    This API (RewindQueue) is used for the message rewind function. For more information, please see Message rewind function .

    • Domain name requested by public network API: https://cmq-queue-{$region}
    • Domain name requested by private network API: http://cmq-queue-{$region}

    The above {$region} in the domain name needs to be replaced with a specific region : gz (Guangzhou), sh (Shanghai), bj (Beijing), shjr (Shanghai Finance), szjr (Shenzhen Finance), hk (Hong Kong, China), cd (Chengdu), ca (North America), usw (American West), sg (Singapore). The region value in the common parameters should be consistent with the region value of the domain name. If there is any inconsistency, the request will be sent to the region specified by the domain name region based on the region value of the domain name.

    At any time (including during internal testing), if the public network downstream Traffic is generated by using a public network domain name, Traffic and cost will be charged. Therefore, users of the service on Tencent Cloud are strongly recommended to use it. Private network Domain name, private network will not produce Traffic cost.

    Input Parameter

    The following request parameter list only lists the API request parameters. For other parameters, please see Common Request Parameters page.

    Parameter name Required Type Description
    QueueName Yes String Queue name, which is unique under the same account in a single region. The queue name is a string of no more than 64 characters, must begin with a letter, and the rest can contain letters, numbers, and dashes (-).
    StartConsumeTime Yes Unix timestamp If this time is set, the (Batch) receiveMessage API will consume the messages after timestamp according to the order in which the messages are produced.

    Output Parameter

    Parameter name Type Description
    Code Int 0: indicates success, others: error. The detailed error is shown in the following table.
    Message String Error message.
    RequestId String Request ID generated by the server. When an internal error occurs on the server, the user can submit this ID to Backend Background to locate the problem.

    Error Codes

    The following are the error codes specific to the interface. If the error code you are looking for is not among them, it may be found in the Common error code Medium.

    Error codeModule error codeEnglish hintDescription
    605010670Your queue cannot be rewindedThe queue cannot rewind.
    400010680Invalid rewind time, you can get the vaild range of that via GetQueueAttributesRewind time error, you can check the queue properties to get the correct rewind time.
    400010700RewindSeconds cannot be greater than msgRetentionSecondsRewind's time cannot be longer than the message retention time.



    Https://domain/v2/index.php?Action=RewindQueue & queueName=test-queue-123&startConsumeTime=unix timestamp & <Common Request Parameters>


    "code" : 0,
    "message" : "",

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback