Viewing a Queue
Function
This API is used to view a specified queue.
URI
GET /v1.0/{project_id}/queues/{queue_id}?include_deadletter={include_deadletter}
Table 1 describes the parameters of this API.
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Indicates the ID of a project. |
queue_id |
String |
Yes |
Indicates the ID of the queue to be viewed. |
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/075ae7da-6ce5-4966-940c-17c19fb5175e?include_deadletter=true
Request
Request parameters
None.
Example request
None.
Response
Response parameters
Table 2 describes the response parameters.
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. |
kafka_topic |
String |
This parameter is returned only for Kafka queues. |
eff_date |
String |
Indicates the time when a queue is created. |
Example response
{ "id": "0611d466-a327-4b7b-8034-f84a0f6a6f42", "name": "queue-001", "description": "This is a FIFO queue.", "reservation": 4320, "created": 1558691803000, "queue_mode": "FIFO", "max_msg_size_byte": 524288, "produced_messages": 14, "eff_date": 1558691803000, "group_count": 1 }
Status Code
Table 3 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