[rabbitmq-discuss] persistent messages can't survive restart with new persister b6324e288cfd (bug21673)

Matthew Sackman matthew at lshift.net
Fri Dec 11 15:38:08 GMT 2009


Hi Garrett,

On Fri, Dec 11, 2009 at 09:30:29AM -0600, Garrett Smith wrote:
> On Fri, Dec 11, 2009 at 8:20 AM, Matthew Sackman <matthew at lshift.net> wrote:
> > This is entirely correct. When you publish a message with delivery
> > mode 2 you are *not* _guaranteed_ that it hits disk. Publishing is an
> > async operation and you get no confirmation that it goes to disk. The
> > new persister does very aggressive caching in order to avoid doing lots
> > of tiny and expensive writes. As such, there will frequently be times
> > where if you restart the broker, you will lose several (maybe hundreds)
> > of messages.
> 
> If you shut down gracefully the caches aren't flushed to disk?

No no, if it's a safe shutdown then yes, everything gets flushed out and
sync'd correctly. I should have made that clear above. You should only
lose messages in the event of a hard kill.

Matthew




More information about the rabbitmq-discuss mailing list