[rabbitmq-discuss] publishing confirms with persistent messages?

Ernest Staszuk ernest.staszuk at comarch.pl
Mon Jul 23 10:33:40 BST 2012


In fact it is possible that rabbit sends confirmation and data
is not stored. The fsync does NOT guarantee that data has been
actually written. What it does is a assurance that hard disk
reported completion of data transfer. Due to writing cashe
of hard memory there could exist a time window when
data has not been permanently stored yet. This could be
prevented by disabling hard disk's writing cache.


W dniu 2012-07-20 10:48, Francesco Mazzoli pisze:
> At Fri, 20 Jul 2012 16:33:23 +0800,
> 黄大鹏 wrote:
>> Hi all,
>>     I read this  "Persistent messages are confirmed when all queues have either
>> delivered the message and received an acknowledgement (if required), or
>> persisted the message." on the offical blog. but when i read the source code,
>> I found maybe it's not true.
>>      in rabbit_msg_store.erl , when write a message to a file, it will record
>> pending confirms,.and sync these confirms very 25 milliseconds, the problem is
>> the file is cached file, so after sended the confirms, the messages may not
>> have been written to disk. am i correct?
> The confirm is sent after fsyncing the msg store file (via
> `file_handle_cache:sync/1'), which flushes all the in-memory changes to
> disc. I'm not sure what you mean by "the file is a cached file".
>
> --
> Francesco * Often in error, never in doubt
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



More information about the rabbitmq-discuss mailing list