I would like to queue the status of my RabbitMQ messages so that I can log them and alert them via a logging tool.
Unfortunately, this curl does not return the number of messages, as can be read in numerous documentations:
curl -s -u user:password -X GET http://localhost:15672/api/queues/<VHOST>/<QEUE> | jq '.'
{
"garbage_collection": {
"max_heap_size": ,
"min_bin_vheap_size": ,
"min_heap_size": ,
"fullsweep_after": ,
"minor_gcs":
},
"consumer_details": [],
"arguments": {},
"auto_delete": ,
"deliveries": [],
"durable": ,
"exclusive": ,
"incoming": [],
"name": "",
"node": "",
"slave_nodes": [
""
],
"synchronised_slave_nodes": [
""
],
"type": "",
"vhost": ""
}
I only get these elements back in response. What do I have to do to get the number per queue?
However, if I list the queues directly on the RabbitMQ server with rabbitmqctl, I get the correct number of queued messages.
Thank you very much