Search code examples
aeron

Can Aeron lose messages?


If I offer a message via Publication to some channel (IPC or UDP) and this operation returns a positive value (new position) that means that data were written on disk (fsynced to /dev/shm) or not? In other words... does Aeron relies on pagecache or not? May I lose data when OS was shut down right after I had offered new data via publication and received positive value in response).


Solution

  • Yes it can. Returning a positive position value indicates only that the message has been written to the term buffer. The term buffer is generally stored in a memory only file system. E.g. on Linux this is /dev/shm.

    Note that fsyncing /dev/shm has no effect as it is not backed by non-volatile storage.

    Aeron Archive is the means to persistently store messages.