[rabbitmq-discuss] browse queue
Emile Joubert
emile at rabbitmq.com
Wed Jul 25 09:46:56 BST 2012
Hi Mark,
On 24/07/12 21:51, Mark Ward wrote:
> Has there been any progress in providing a method to browse a queue?
The release notes will indicate whether a particular feature has been
completed, or the changelog for major features:
http://www.rabbitmq.com/changelog.html
Explicit support for queue browsing is not a supported feature at this
time (v2.8.4).
> I need a method to provide a status of the tasks we have in the queue.
> Avoid queuing tasks already queued.
Note that this solution presupposes that you can pause the queue
in-between browsing the queue and enqueuing the new task. Without this
the state of the queue might change between these two events.
> What are the difficulties with browsing a queue in rabbitMQ that make
> this a complicated problem?
The design of RabbitMQ queues assume that they are only ever read from
the head, one item at a time, and this is a destructive operation. A
read message can be requeued, but then it will subsequently show as
redelivered.
As alternative options you can possibly implement your own message store
(e.g. on top of a database) and use it as an approximation of the state
of the queue.
Another alternative is to consume and requeue or republish every message
in the queue. This operation will have some performance implications,
depending on the length of the queue.
-Emile
More information about the rabbitmq-discuss
mailing list