On-disk layout
Every file Mojay writes in a data folder, what it is for, and how its format is versioned.
Record format
How a message is encoded on disk, how segments roll over, and how the sparse index finds an offset.
Crash recovery
What Mojay repairs after a crash, what it refuses to repair, and how to look at a segment yourself.
Shared state and locks
The memory-mapped partitions.state file, its memory ordering, and why Mojay uses flock with an explicit unlock.
Write path and group commit
The steps of a send, how several writers share one fsync, and why messages only become readable once they are on disk.
Consumer groups without a server
How group members find each other, share partitions, survive crashes and commit offsets, with nothing but files and flock.