[rabbitmq-discuss] check if queue is empty?
Marek Majkowski
majek04 at gmail.com
Wed Sep 28 10:56:24 BST 2011
On Wed, Sep 21, 2011 at 18:35, Mark K <mkovachmcse at aol.com> wrote:
> An additional question: I want to be able to spin up and down consumers as
> needed, depening on the number messages in the queue. My thought is to do this
> in the code that is the consumer, if no more messages then do a clean close and
> release the thread it runs in. I have it working to a point, but not great. Are
> there any examples of having the consumer close when "sees" there are no more
> messages in a queue without just killing a thread the ugly way? Or is my logic
> wrong on how to do something like this? I'm using this with Python 2.7.
What do you mean by "killing a thread the ugly way" ?
Marek.
More information about the rabbitmq-discuss
mailing list