[rabbitmq-discuss] persistent messages can't survive restart with new persister b6324e288cfd (bug21673)
mabrek
mabrek at gmail.com
Fri Dec 11 16:05:20 GMT 2009
On Fri, Dec 11, 2009 at 6:38 PM, Matthew Sackman <matthew at lshift.net> wrote:
> 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.
>
Yes, it's logical to lose messages after kill -9.
But in in my case messages got lost after safe shutdown
(/etc/init.d/rabbitmq restart or
rabbitmqctl stop)
Regards,
Anton Lebedevich.
PS Matthew, sorry for message doubling, I've forgot to reply to list
More information about the rabbitmq-discuss
mailing list