Distributed Message Service RabbitMQ

Query Queue

2024-06-27 06:49:05

Interface Protocol

Interface

https://[endpoint].ctapi.ctyun.cn/v1/queue/query

Request Method

GET

Request Parameters

Required or Not

Parameter Type

Description

prodInstId

Yes

String

Instance ID

vhost

No

String

vhost name

name

No

String

Queue Name

Response Parameter

Parameter Type

Description

statusCode

String

The status code of the interface on the system layer.   Success: 800; failure: 900.

message

String

Status Description

returnObj

String

Return the object. The parameters included in this   parameter are described in the comments in Response Examples.

Return Value

Parameter Name

Parameter Type

Description

x-message-ttl

Integer

Message expiration time: number type (unit: ms)

x-expires

Integer

Queue expiration time (automatically deleted after the   queue is expired: number type (unit: ms))

x-max-length

Integer

Maximum number of messages that can be stored in a queue:   number type (unit: number)

x-max-length-bytes

Integer

Maximum number of messages that can be stored in a queue:   number type (unit: byte)

x-overflow

Single choice (drophead\reject-publish)

Message receiving policy after the maximum limit of the   queue is exceeded. drop-head: Delete the header message, which is generally   the earliest message sent, to ensure queue availability. reject-publish:   Refuse to receive new messages to ensure that messages are not lost.

x-dead-letter-exchangeh

String

Name of Dead Letter Exchange

x-dead-letter-routing-key

String

Dead Letter Routing Key

x-max-priority

Integer

Maximum queue priority: To enable the priority of a   message, you must set the priority of the queue that contains the message

x-queue-mode

Single choice (default\lazy)

Queue lazy modes: default: default value and ordinary   queue. lazy: indicates a lazy queue. Messages are saved to disks as much as   possible, resulting in a large number I/O operations, and little memory   consumption. (It is recommended for scenarios with a large accumulation of   persistent messages)

x-queue-master-locator

Single choice (client-local\min-masters\random)

Queue save location: client-local: nodes used for   connection during queue creation. min-masters: Node with the smallest number   of active nodes in the cluster. random: Randomly specify a node by the   RabbitMQ server.

Sample Request

`GET https://[endpoint].ctapi.ctyun.cn/v1/queue/query`

Return Example

(1) Example of successful response

{

    "returnObj": {

        "data": {

            "consumer_details": [],

            "arguments": {},

            "auto_delete": false,

            "backing_queue_status": {

                "avg_ack_egress_rate": 0.0,

                "avg_ack_ingress_rate": 0.0,

                "avg_egress_rate": 0.0,

                "avg_ingress_rate": 0.0,

                "delta": [ "delta","undefined",0,0,"undefined" ],

                "len": 0,

                "mode": "default",

                "next_seq_id": 0,

                "q1": 0,

                "q2": 0,

                "q3": 0,

                "q4": 0,

                "target_ram_count": "infinity"

            },

            "consumer_utilisation": null,

            "consumers": 0,

            "deliveries": [],

            "durable": true,

            "effective_policy_definition": [],

            "exclusive": false,

            "exclusive_consumer_tag": null,

            "garbage_collection": {

                "fullsweep_after": 65535,

                "max_heap_size": 0,

                "min_bin_vheap_size": 46422,

                "min_heap_size": 233,

                "minor_gcs": 5

            },

            "head_message_timestamp": null,

            "idle_since": "2019-10-17 12:32:08",

            "incoming": [],

            "memory": 16908,

            "message_bytes": 0,

            "message_bytes_paged_out": 0,

            "message_bytes_persistent": 0,

            "message_bytes_ram": 0,

            "message_bytes_ready": 0,

            "message_bytes_unacknowledged": 0,

            "messages": 0,

            "messages_details": { "rate": 0.0 },

            "messages_paged_out": 0,

            "messages_persistent": 0,

            "messages_ram": 0,

            "messages_ready": 0,

            "messages_ready_details": { "rate": 0.0 },

            "messages_ready_ram": 0,

            "messages_unacknowledged": 0,

            "messages_unacknowledged_details": { "rate": 0.0 },

            "messages_unacknowledged_ram": 0,

            "name": "queue",

            "node": "rabbit@node19216890135",

            "operator_policy": null,

            "policy": null,

            "recoverable_slaves": null,

            "reductions": 29757,

            "reductions_details": { "rate": 0.0 },

            "state": "running",

            "vhost": "/"

        }

    },

    "message": "success",

    "statusCode": "800"

}

(2) Example of failed response

{

    "returnObj": {},

    "message": "...",

    "statusCode": "900"

}


44VWMDjxGFfT