Open chris-cynation opened 1 year ago
At this moment no there is not a way to get queue count, I am not sure that is possible with amqplib currently. The underlying tech is ampqlip https://amqp-node.github.io/amqplib/channel_api.html so if you are interested in adding that functionality to this package please open a PR
I think https://amqp-node.github.io/amqplib/channel_api.html#channel_checkQueue
Gives the info, but unsure of the implications perf wise.
For those interested I currently make an http management call to get the info.
@chris-cynation interesting. Would you be willing to give an example of that request here for others can do something in the interim?
Here's how I do it:
http:
method: 'get',
url: http://${rabbitHost}:15672/api/queues/%2F/${queueName}
response.messages
has the message count.
Do you still desire this? Others?
@chris-cynation are you willing to open a PR for this?
Hi, I'd desire it but wouldn't have the time to work on it.
I'm not closing this as I think it is useful, as clearly you opened this as it would be useful in your scenario. @chris-cynation if you feel things are not problematic how you are currently handling things though maybe keep doing as your doing. Its been awhile and no one else has responded.
I also have limited time, as much as I would like to dedicate here. This is more of a passion project for me
Is there a way to get the current queue message count?
Looking to periodically check to reduce back pressure.