Engineered From CPU Cache Lines Down to NVMe Queues
Legacy brokers hit hard ceilings from global locks, GC pauses, and random I/O amplification. AetherMQ re-engineers every microsecond from socket sniff to NVMe sector alignment.
1. Shared-Nothing Thread-per-Core Mesh
Each shard pins to a CPU core with core-local !Send queue state and routing graphs. Inter-core hops traverse bounded lock-free SPSC rings. On Linux, per-shard SO_REUSEPORT eliminates accept-queue contention.
2. Sequential Physical WAL × Logical Queue Index
All queues share sequential 64 MiB WAL segments protected by CRC32C and 4 KiB alignment, coalescing concurrent publishes into microsecond Group Commits. Multicast fanout writes the WAL once and fans out 64B index slots.
3. Tiered Cold Offload & Cascading Segment GC
Hot payloads stay strictly capped by --hot-cache-mb; excess backlog spills to WAL segments without growing RSS. Sealed segments track live counts and reclaim disk space immediately upon ACK drain or Purge.
4. Zero-Alloc Lock-Free Plugin Chain
A 64-bit atomic hook mask skips unhooked stages in a single relaxed load. Active plugins use thread-local scratch buffers, generation-cached immutable chains (zero RwLock), and queue_patterns allowlists.
5. Safe-Rust MQTT 5.0 Segment Trie Engine
Built with #![forbid(unsafe_code)], routing in O(topic depth) with spec-compliant $SYS isolation, atomic $share round-robin groups, 0x8E session takeover, and idle buffer shrinking (~2 KiB/conn).
6. Strict Data-Plane / Control-Plane Isolation
20-bucket Log2 atomic latency histograms (<5ns), host OS telemetry, Console queries, and PostgreSQL audit/version persistence run completely off the hot path so observability never perturbs tail latency.