mosquito / aio-pika

AMQP 0.9 client designed for asyncio and humans.
https://aio-pika.readthedocs.org/
Apache License 2.0
1.18k stars 186 forks source link

Get all consumers of the queue #500

Closed VladaSabelnikova closed 1 year ago

VladaSabelnikova commented 1 year ago

Hello!

I need to get a list of all consumers of a queue. In RabbitMQ, this can be done with the following command: rabbitmqctl list_consumers

Is there such functionality in aio-pika (I didn't find it in the documentation)? And if not, do you have any ideas how to do it differently?

Thanks in advance for your reply 😃

mosquito commented 1 year ago

It's not possible when using amqp protocol, and not a part of amqp 0.9.x specs. This information available through rabbitmq http api, but I feel that you are doing something wrong.

If your aim is healthcheck of available consumers you might sent message with very short expiration. But I feel you should use RPC instead.