[rabbitmq-discuss] publishing confirms with persistent messages?

Francesco Mazzoli francesco at rabbitmq.com
Fri Jul 20 09:48:13 BST 2012


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


More information about the rabbitmq-discuss mailing list