rabbitmqmonitoringrabbitmq-exchangerabbitmqctl

RabbitMQ list limited (full) queues


is there an api/rabbitmqctl call to list full queues? That is queues that are on limit by max-length or max-lengthbytes. Sometimes certain queues reach this threshold and we would like to monitor this.

Thanks

rabbitmqctl list_queues name arguments doesn't seem to show global limits from policies


Solution

  • rabbitmqctl list_queues name arguments doesn't seem to show global limits from policies

    No, it won't, you would have to use rabbitmqctl list_policies

    You can use the HTTP API to determine if your queue is close to the max. Here is an example output for listing a queue. Note that messages and message_bytes are in the output, as well as the policy:

    {
        “consumer_details”: [],
        “arguments”: {
            “x-queue-type”: “quorum”,
            “x-quorum-initial-group-size”: 1
        },
        “auto_delete”: false,
        “consumer_capacity”: 0,
        “consumer_utilisation”: 0,
        “consumers”: 0,
        “deliveries”: [],
        “durable”: true,
        “effective_policy_definition”: {
            “max-length-bytes”: 10000000
        },
        “exclusive”: false,
        “garbage_collection”: {
            “fullsweep_after”: 65535,
            “max_heap_size”: 0,
            “min_bin_vheap_size”: 46422,
            “min_heap_size”: 233,
            “minor_gcs”: 11
        },
        “incoming”: [],
        “leader”: “rabbit-1@nkarlVMD6R”,
        “members”: [
            “rabbit-3@nkarlVMD6R”,
            “rabbit-1@nkarlVMD6R”
        ],
        “memory”: 47929396,
        “message_bytes”: 9984000,
        “message_bytes_dlx”: 0,
        “message_bytes_persistent”: 9984000,
        “message_bytes_ram”: 0,
        “message_bytes_ready”: 9984000,
        “message_bytes_unacknowledged”: 0,
        “messages”: 39,
    

    This data is refreshed about every 5 seconds.

    Note that you shouldn't hammer the HTTP API with frequent requests, either!