[rabbitmq-discuss] stop when queue is empty
majek04 at gmail.com
Mon Nov 22 12:54:01 GMT 2010
On Mon, Nov 22, 2010 at 12:14, Steven Taylor <taylste at gmail.com> wrote:
> Thanks. That's useful. So there's a consumer count. I'd been thinking about
> misbehaving workers... meaning that we may be waiting for a message to
> reappear on the queue after a time to live period has expired? So that would
> mean the worker can go on misbehaving and we wont care. Of course this
> assumes the message itself isn't malformed. We're not in a perfect world, so
> choose one and move on.
> In this situation nothing destructive needs to happen. Finished or nearly
> finished is good enough for me.
In that case just run basic.get or queue.declare and check the message count.
> On 22 November 2010 21:31, Marek Majkowski <majek04 at gmail.com> wrote:
>> Have you seen this thread:
>> On Sun, Nov 21, 2010 at 21:52, Steven Taylor <taylste at gmail.com> wrote:
>> > Hi,
>> > I was planning on using a BasicGet return value of null as a termination
>> > condition.
>> > The pattern I'm working with that this enables is:
>> > -> stream from database
>> > -> do some stuff in parallel
>> > -> stream back to database
>> > thanks,
>> > -Steven
More information about the rabbitmq-discuss