[rabbitmq-discuss] adjusting timeout for non-acked messages to be requeued

Matthew Sackman matthew at lshift.net
Sun Jan 24 01:10:45 GMT 2010


On Sun, Jan 24, 2010 at 01:54:41AM +0100, Uwe Kubosch wrote:
> > Rabbit does eventual delivery. Thus eventually, the message will be
> > delivered. However, it may be delivered to more than one consumer. A
> > message that is not ack'd will, when the channel on which it was
> > delivered closes (or the connection, or some other condition that I
> > always forget, but which Matthias pointed out within about the last
> > month on this list), be reinserted into its queue to be redelivered.
> 
> Where in the queue is the message requeued on disconnect?

It's not defined in the spec. RabbitMQ puts it at the tail of the queue,
but there is no guarantee that that behaviour will not change in the
future. Do not rely on this.

> If there is only one client, and prefetch is set to 1, and this client does not ack a message and disconnects, will the same message be delivered first on reconnect, or is there a chance of out-of-order delivery?

As above - it's currently the case that the message will be put at the
end of the queue and will be the last message delivered. The spec does
not rule either way on this. You should be able to verify this behaviour
yourself from testing.

Matthew




More information about the rabbitmq-discuss mailing list