Polyconseil / aioamqp

AMQP implementation using asyncio
Other
280 stars 88 forks source link

how can i get queue length ? #148

Closed inzem77 closed 6 years ago

inzem77 commented 7 years ago

Hello! I read all examples and documentation but didn't find as i can get queue length

inzem77 commented 7 years ago

for example asyncio queue has method empty()

dzen commented 7 years ago

Did you check AMQP's protocol documentation ?

inzem77 commented 7 years ago

litle bit

inzem77 commented 7 years ago

for example in pika res = channel.queue_declare( callback=on_callback, queue="test", durable=True, exclusive=False, auto_delete=False, passive=True ) print 'Messages in queue %d' % res.method.message_count

dzen commented 7 years ago

Hello @inzem77.

If you did check the return of queue_declare, it should return a dict : https://github.com/Polyconseil/aioamqp/blob/master/aioamqp/channel.py#L357

inzem77 commented 6 years ago

ok, Thank you