https://cmq-queue-{$region}.api.qcloud.com
http://cmq-queue-{$region}.api.tencentyun.com
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 (-). |
NumOfMsg | Yes | Int | The number of messages consumed this time. The range of values is 1-16. |
PollingWaitSeconds | No | Int | The long polling waiting time for this request. The value range is 0-30 seconds. If this parameter is not set, the pollingWaitSeconds value in the queue attribute is used by default. |
Parameter name | Type | Description |
Code | Int | |
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. |
MsgInfoList | Array | A list of message information, with each element being the specific information of a message. |
Parameter name | Type | Description |
MsgBody | String | The message body of consumption. |
MsgId | String | The consumed message uniquely identifies the ID. |
ReceiptHandle | String | Each consumption returns a unique Message Handler, which is used to delete consumption. Only the handle generated by the last consumption of the message can be used to delete the message. And the validity period is visibilityTimeout, that is, the period of time for which hidden is taken out. After that time, the handle becomes invalid. |
EnqueueTime | Int | The time when consumption is produced and enters the queue. Returns Unix timestamp, accurate to seconds. |
FirstDequeueTime | Int | Reserved field. |
NextVisibleTime | Int | The next time the message is visible (can be consumed again). Returns Unix timestamp, accurate to seconds. |
DequeueCount | Int | Reserved field. |
Https://domain/v2/index.php?Action=BatchReceiveMessage & queueName=test-queue-123 & numOfMsg=2 & <Common Request Parameters>
{"code": 0,"message": "","requestId": "14534664555","msgInfoList":[{"msgBody": "helloworld1","msgId": "123345346","receiptHandle": "283748239349283","enqueueTime": 1462351990,"firstDequeueTime": 1462352990,"nextVisibleTime": 1462352999,"dequeueCount": 2},{"msgBody": "helloworld2","msgId": "1233453456","receiptHandle": "28374345763283","enqueueTime": 1462351990,"firstDequeueTime": 1462352990,"nextVisibleTime": 1462352999,"dequeueCount": 2}]}
Was this page helpful?