Viewing All Queues
Function
This API is used to view all queues.
URI
GET /v1.0/{project_id}/queues?include_deadletter={include_deadletter}
Table 1 describes the parameters of this API.
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Indicates the project ID. |
include_deadletter |
Boolean |
No |
Indicates whether to list dead letter parameters in the response message. Options:
The default value is false. Kafka queues do not support dead letter messages. This parameter is invalid for Kafka queues. |
GET v1.0/b78a90ae2a134b4b8b2ba30acab4e23a/queues?&include_deadletter=true
Request
Request parameters
None.
Example request
None.
Response
Response parameters
Table 2 and Table 3 describe the response parameters.
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Indicates the total number of queues that belong to the tenant. |
queues |
Array |
Indicates the total number of all queue arrays that belong to the tenant. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Indicates the queue ID. |
name |
String |
Indicates the queue name. |
created |
String |
Indicates the time when a queue is created. |
description |
String |
Indicates the basic information about a queue. |
queue_mode |
String |
Indicates the queue type. |
reservation |
Integer |
Indicates the retention period (unit: min) of a message in a queue. |
max_msg_size_byte |
Integer |
Indicates the maximum message size (unit: byte) that is allowed in a queue. |
produced_messages |
Integer |
Indicates the total number of messages in a queue. |
redrive_policy |
String |
Indicates whether to enable dead letter messages. This parameter is displayed only when include_deadletter is set to true. Options:
|
max_consume_count |
Integer |
Indicates the maximum number of allowed message consumption failures. When a message fails to be consumed after the number of consumption attempts of this message reaches this value, DMS stores this message into the dead letter queue. This parameter is displayed only when include_deadletter is set to true. |
group_count |
Integer |
Indicates the number of consumption groups in a queue. |
eff_date |
String |
Indicates the time when a queue is created. |
Example response
{ "queues" : [{ "id" : "ef808d2d-58c2-4a36-9e58-d018b2193f80", "name" : "aaa_fifo_525", "description" : "test_fifo_detail", "queue_mode" : "NORMAL", "reservation" : 4320, "created" : 1495701557000, "max_msg_size_byte" : 524288, "produced_messages" : 1, "redrive_policy" : "enable", "max_consume_count" : 3, "eff_date": 1495701557000, "group_count" : 0 }, { "id" : "bc0ac1ec-a4d6-4490-84cb-9d475f1ec3c5", "name" : "aaa_normal_525", "description" : "test", "queue_mode" : "NORMAL", "reservation" : 4320, "created" : 1495701490000, "max_msg_size_byte" : 524288, "produced_messages" : 0, "redrive_policy" : "enable", "max_consume_count" : 3, "eff_date": 1495701490000, "group_count" : 0 }, { "id" : "1aaf34d0-7bb0-43be-9b71-f4b719d7ca47", "name" : "queue-normal", "description" : null, "queue_mode" : "NORMAL", "reservation" : 4320, "created" : 1495447342000, "max_msg_size_byte" : 524288, "produced_messages" : 2, "redrive_policy" : "enable", "max_consume_count" : 3, "eff_date": 1495447342000, "group_count" : 0 }, { "id" : "f685ed59-43f4-4cf9-b609-7f333820d72d", "name" : "queue-835807102", "description" : "", "reservation" : 2160, "created" : 1517379348000, "queue_mode" : "KAFKA_HA", "max_msg_size_byte" : 524288, "produced_messages" : 0, "eff_date": 1517379348000, "group_count" : 0 } ], "total" : 4 }
Status Code
Table 4 lists the status code indicating that the operation is successful. For details about the status codes indicating that the operation fails, see Status Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot