[rabbitmq-discuss] View messages in queue

Emile Joubert emile at rabbitmq.com
Fri May 3 09:51:10 BST 2013


Hi,

On 03/05/13 07:35, ashok wrote:
> a) View all messages in the queue (not just head), while not destroying
> order of messages in the queue

This is possible since v2.7.0:
http://www.rabbitmq.com/semantics.html#ordering
You should be aware that the requeueing messages sets the redelivery
flag, so subsequent consumers will not get an identical message.

> b) To be able to delete a message at a specific position: Currently I can
> delete only head. This does defeat the meaning of queue, though in one of my
> use case, it does seem useful to have such feature.

This use-case may indicate that you will be better served by a database
than a message broker. Even so it is possible to selectively consume a
message by retrieving messages up to the position of interest. Then
acknowledge the message that you want to remove and requeue all the
messages ahead of it in the queue.

This is a relatively expensive operation compared to a database delete.
It also assumes that there is only one consumer. If there are multiple
consumers then it will be difficult to remove messages based on position.




-Emile








More information about the rabbitmq-discuss mailing list