V
V
Viktor Sypko2013-12-05 13:59:38
Python
Viktor Sypko, 2013-12-05 13:59:38

AQMP and reading queue status

How to read queue status in AMQP? It is necessary to understand whether there is something in it at the moment.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
stepank, 2013-12-05
@Bulkinss

For different clients, the API is slightly different, but in fact only the names of the functions. For example, amqp has this method . The description states the following:

Returns a tuple containing 3 items:
the name of the queue (essential for automatically-named queues)
message count
consumer count

The second element of the returned tuple is the number of records.
Another more severe option is to subscribe to a queue and, if after some time (for example, 10 seconds) no messages have arrived, most likely there is simply nothing in the queue.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question