[rabbitmq-discuss] Read all, ack later?

Simon MacMullen simon at rabbitmq.com
Mon Nov 11 11:09:08 GMT 2013


It's not an awful thing to do. The cost of an unacked message varies 
(depending on whether it's paged out etc) but is always somewhat higher 
than that of a "ready" message. And requeuing a ton of unacked messages 
can be expensive (particularly if a lot of them are paged out). Finally, 
the delivery tags of unacked messages are always held in memory and 
can't be paged out.

So it depends a bit. I would be wary of doing it (at least I would want 
to do my own performance tests) if the queue was not expected to fit in 
memory. Of course, doing your own performance tests is always a good 
idea :-)

Cheers, Simon

On 11/11/2013 10:52AM, RocknrollArmy wrote:
> Hello,
>
> is it a valid scenario for RabbitMQ to have a queue with persisted
> messages, where a consumer first wants to read all messages from the queue,
> but do the ack for all or none of them later on?
>
> It's about keeping messages in a queue until some consumer criteria
> decides that all messages needed are received. If the criteria fails,
> the connection just dies and the messages would remain in the queue
> until a new message arrives and a new consumer connects and does the
> check again.
>
> Not sure if this is generally a good/bad idea or a use case where a
> queue is the right tool.
>
> Any thoughts on this?
>
> Best regards,
>
> Daniel
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>

-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list