summaryrefslogtreecommitdiff
path: root/src/rabbit.erl
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2009-06-10 15:44:54 +0100
committerMatthew Sackman <matthew@lshift.net>2009-06-10 15:44:54 +0100
commit6c013060af8af871693ed3377d0958bb5fb97990 (patch)
treef074304c1fdf3677e98ba681d407b96f95073da1 /src/rabbit.erl
parent91bfb6912503717901a8fd36a80fa9dc9bcf01fc (diff)
downloadrabbitmq-server-git-6c013060af8af871693ed3377d0958bb5fb97990.tar.gz
Two things have happened here. Firstly, the mixed_queue now functions correctly when being run in disk_only mode. This is _much_ more complicated than I had thought because of the fact that the presence of a message on disk has nothing to do with whether it is persistent or not. As a result early acking is required and requeuing operations are horrendous to say the least.
When going from disk-only mode to mixed mode, we don't ack anything at all. It's arguable that we should ack non-persistent messages at this point, but the problem there is that if the conversion fails then we lose messages. Therefore, we then arrive at the sitation where we're in mixed mode, and we have messages held in ram that are not persistent, but are still on disk, and require early acking when being delivered (again, requeue is hell). The conversion to and from disk-only and mixed mode now seems to work well. When starting up, non-persistent messages on disk are deleted. Finally, in disk_queue, publish now takes an IsDelivered flag. This allows you to publish messages and mark them delivered in one go. However, the message is still available for delivery (i.e. it's not waiting for an ack). Also in disk_queue, requeue_with_seqs is now [{AckTag, {NewSeqId, NewIsDelivered}}], which allows you to requeue and unset the delivered flag. Note however, that it is still not safe to requeue a message which isn't waiting for an ack. (Please note, it's now very important to distinguish between messages which "AreDelivered" _and_ are waiting for an ack _and_ are not going to appear if you call deliver(Q), VERSUS messages which "AreDelivered" but are not waiting for an ack and will appear (eventually) if you call deliver(Q).
Diffstat (limited to 'src/rabbit.erl')
0 files changed, 0 insertions, 0 deletions