Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queue message Count #41

Open
chris-cynation opened this issue Jan 31, 2023 · 7 comments
Open

Queue message Count #41

chris-cynation opened this issue Jan 31, 2023 · 7 comments

Comments

@chris-cynation
Copy link

Is there a way to get the current queue message count?

Looking to periodically check to reduce back pressure.

@zlintz
Copy link
Member

zlintz commented Feb 19, 2023

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

@chris-cynation
Copy link
Author

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.

@zlintz
Copy link
Member

zlintz commented Mar 8, 2023

@chris-cynation interesting. Would you be willing to give an example of that request here for others can do something in the interim?

@chris-cynation
Copy link
Author

Here's how I do it:
http:
method: 'get',
url: http://${rabbitHost}:15672/api/queues/%2F/${queueName}

response.messages

has the message count.

@zlintz
Copy link
Member

zlintz commented Nov 21, 2023

Do you still desire this? Others?

@chris-cynation are you willing to open a PR for this?

@chris-cynation
Copy link
Author

chris-cynation commented Nov 30, 2023

Hi,
I'd desire it but wouldn't have the time to work on it.

@zlintz
Copy link
Member

zlintz commented Sep 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants