Querying Queues of a Virtual Host
Function
This API is used to query queues of a virtual host.
Calling Method
For details, see Calling APIs.
URI
GET /v2/rabbitmq/{project_id}/instances/{instance_id}/vhosts/{vhost}/queues
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
instance_id |
Yes |
String |
Instance ID. |
vhost |
Yes |
String |
Virtual host name. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Offset, which is the position where the query starts. The value must be greater than or equal to 0. |
limit |
No |
Integer |
Number of records on each page. Value range: 0–50. The default value is 10. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
size |
Integer |
Number of displayed records. |
total |
Integer |
Total number of results in a query. |
items |
Array of QueueDetails objects |
Query details. |
Parameter |
Type |
Description |
---|---|---|
vhost |
String |
Virtual host name. |
name |
String |
Queue name. |
durable |
Boolean |
Indicates whether data persistence is enabled. |
auto_delete |
Boolean |
Indicates whether automatic deletion is enabled. |
messages |
Integer |
Accumulated messages. |
consumers |
Integer |
Connected consumers. |
policy |
String |
Policy. |
arguments |
QueueArguments object |
Queue parameter. This parameter is not returned if it is not configured. |
Parameter |
Type |
Description |
---|---|---|
x-message-ttl |
Long |
Message retention period. This parameter indicates for how long a message in this queue can be retained. |
x-dead-letter-exchange |
String |
Name of the dead letter exchange. Rejected and expired messages are re-sent to this exchange. |
x-dead-letter-routing-key |
String |
Routing key of the dead letter exchange. The dead letter exchange sends dead letter messages to the queue with a matching routing key. |
x-queue-mode |
String |
Lazy queue. |
Example Requests
Querying queues
GET https://{endpoint}/v2/rabbitmq/{project_id}/instances/{instance_id}/vhosts/{vhost}/queues?offset=0&limit=10
Example Responses
Status code: 200
Successful
{ "size" : 1, "total" : 1, "items" : [ { "durable" : true, "name" : "queue10", "auto_delete" : false, "messages" : 0, "consumers" : 0, "arguments" : { "x-dead-letter-exchange" : "dead-exchange-deal", "x-dead-letter-routing-key" : "dead-ex-routing-key", "x-message-ttl" : 60000 } } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Successful |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.