我可以使用rabbitmqctl 來取得消費者的數量,如下所示:
# rabbitmqctl list_queues name consumers | grep q-firewall-plugin
q-firewall-plugin 2
但是當使用 API url 時:
/api/queues/%2F/q-firewall-plugin
它的響應如下:
{
"consumer_details":[],
"name":"q-firewall plugin",
"vhost":"/",
"durable":true,
"auto_delete":false,
"arguments":{"x-ha-policy":"all"},
"node":"rabbit@infra-rabbitmq-2"
}
我期待在 中看到幾個消費者consumer_details
。我究竟做錯了什麼 ?
答案1
應該有另一個稱為消費者的領域,它可以為您提供數數。
{
"consumers": 0,
"consumer_details": [],
"name": "Liquid.RPC.Debug",
}