[rabbitmq-discuss] suspending and resuming a QueueingConsumer

Jim Irrer irrer at umich.edu
Thu Jan 14 18:30:13 GMT 2010

Matthew -

I'm trying to build an infrastructure on top of RabbitMQ that allows
an administrator to remotely suspend and resume a server.

Servers generally run in a loop, and in many cases spend most of
their time (very efficiently) waiting on read.  Given such a server,
we wish to suspend it before it processes another message.

If there are several servers reading from the same queue, and
we want to suspend one of them, and if we used the ack-ing manually
approach, then one message would be held by the suspended server
and could not be processed by any of the others.  We would like that
message to instead be processed by one of the other servers.  I suppose
that the suspended server could write the message back to the queue,
but that seems a little like a hack.

Sorry if I'm not being clear,

- Jim

Jim Irrer     irrer at umich.edu       (734) 647-4409
University of Michigan Hospital Radiation Oncology
519 W. William St.             Ann Arbor, MI 48103

On Thu, Jan 14, 2010 at 12:04 PM, Matthew Sackman <matthew at lshift.net>wrote:

> Hi Jim,
> On Thu, Jan 14, 2010 at 11:19:41AM -0500, Jim Irrer wrote:
> > Matthew -
> >
> > Thanks for trying but that does not really help.  I want to interrupt a
> > free-running
> > process that has already posted the read.  To explore this, I modified
> > RabbitMQ's
> > SimpleConsumer class (below) to post a read (via the nextDelivery
> method),
> > and
> > while it is waiting, have another thread close the channel.
> Hmm. Could you explain why you're wanting to do this? I'm sufficiently
> confused that I'm suspecting there's a better solution to the problem
> you're trying to solve.
> Matthew
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100114/cda00295/attachment.htm 

More information about the rabbitmq-discuss mailing list