is there any way to return the number of messages that are unacknowledged?
I am using this code to get the number of messages in the queue:
DeclareOk dec
As you say in your update, if you enable the management plugin, you can query the rest api:
Eg:
`http://username:password@queue-server:15672/api/queues/%2f/queue_name.queue`
This returns json with (among other things)
It's good stuff if you have a safe route to the server.
actual url for 3.8.9 version:
http://username:password@queue-server:15672/api/queues/%2F/queue-name