Mnesia is _not_ the storage layer for messages (except for delayed messages).
Mnesia stores vhosts, users, permissions, queue definitions and more. This is being transitioned to Khepri, which improves a lot of things (maybe most importantly netsplits) but not directly message speeds.
ra for those interested: https://github.com/rabbitmq/ra
("A Raft implementation for Erlang and Elixir that strives to be efficient and make it easier to use multiple Raft clusters in a single system.")
Used by RabbitMQ for quorum queues + Khepri (the new metadata store)