rabbitmq-server
rabbitmq-server copied to clipboard
Could `enable_queue_totals` be allowed for `/api/queues/<vhost>/<name>`
Is your feature request related to a problem? Please describe.
Currently, for api/queues, the docs state:
The parameter enable_queue_totals=true can be used in combination with the disable_stats=true parameter to return a reduced set of fields and significantly reduce the amount of data returned by this endpoint. For
/api/queues/<vhost>/<name>, thedisable_statsflag works, but addingenable_queue_totalsdoes not add the totals.
/api/queues with both options:
{
"arguments": {},
"auto_delete": false,
"durable": true,
"exclusive": false,
"messages": 0,
"messages_ready": 0,
"messages_unacknowledged": 0,
"name": "voice-notification-activity-c6op5ktn0x4",
"node": "rabbit@op-rabbit",
"state": "running",
"type": "classic",
"vhost": "/"
}
/api/queues/<vhost>/<name>:
{
"arguments": {},
"auto_delete": false,
"durable": true,
"exclusive": false,
"name": "voice-notification-activity-c6op5ktn0x4",
"node": "rabbit@op-rabbit",
"state": "live",
"type": "classic",
"vhost": "/"
}
Describe the solution you'd like
Adding the enable_queue_totals option would include the message counts. I realize that the payload size is less of a consideration when fetching a single queue vs the list of queues, but since the disable_stats option is already implemented for this one, it would be nice to be able to use consistent types for these in application code.
Describe alternatives you've considered
No response
Additional context
No response
Tangentially related to: https://github.com/rabbitmq/rabbitmq-server/issues/9437
Yup, I don't see any justification for the difference, I suspect that virtual host-specific endpoint has just slipped through the cracks. Unfortunately I don't think we will get to work on this for at least several weeks.
Hey, if anyone hasn't started on this issue yet, I'd be happy to take a look.