[rabbitmq-discuss] Orderly purge of a queue without losing messages

Adam Rabung adamrabung at gmail.com
Mon Dec 12 20:33:42 GMT 2011


Hello,
I am working on a feature that will allow an admin to perform "bulk
operations" against a single physical queue.  For example, the admin
may want to say "In queue A, Delete all messages with publisher id =
X".  Unfortunately, this system will be dealing with large backlogs,
and the admin will need some means of selectively updating/deleting
these backlogs.  Throttling publishers is not an option for me.

I believe the only way to do this in Rabbit would be to drain the
queue, perform update/delete against matching messages, and re-queue
them.  In addition to being terribly inefficient, this has all kinds
of difficulties: canceling all channels currently listening to the
queue, performing the bulk operation and re-queueing from a single
thread (to preserve order), and then re-connecting all channels.

I am hoping that I am missing something major, and this isn't as bad
as it sounds.  Has anyone had success with this type of operation?

Any pointers much appreciated,
Adam


More information about the rabbitmq-discuss mailing list