Fan-out is the few-to-many case, and the one that isolates delivery cost: a handful of publishers on a handful of topics, with a thousand subscribers on each. One received message becomes a thousand sends, so the inbound side is negligible and what is being measured is almost entirely the broker's delivery path.
5 publishers on 5 topics at 50 messages/second each — 250 messages/second inbound — and 1,000 subscribers each subscribed to all five topics, giving 250,000 messages/second delivered. QoS 1, 16-byte payload, 5 minutes. Only 1,005 connections are involved, so this is a throughput test rather than a connection-scale one. The scenario mirrors the Open MQTT Benchmark Suite's singlenode-fanout-5-1000-5-250K case; see the Test Environment page for hardware, tuning and method.
Server
Version
Messages
Achieved rate
Avg latency
CPU
Peak RAM
EMQX 5.8.9
5.8.9
74,989,957
249,966/s
4.0ms
870% mean / 1557% peak
430 Mb
Mosquitto 2.0.22-5build1
2.0.22-5build1
31,381,388
104,604/s(below target)
87s
74% mean / 100% peak
2.52 Gb
XMQ 0.9.18
0.9.18
74,998,001
249,993/s
1.3ms
347% mean / 367% peak
52 Mb
FlashMQ 1.27.1
1.27.1
74,998,001
249,993/s
2.1ms
547% mean / 555% peak
28 Mb
EMQX 5.8.9
Mosquitto 2.0.22-5build1
XMQ 0.9.18
FlashMQ 1.27.1
Latency uses a logarithmic axis: the brokers differ by several orders of magnitude in this scenario, and a linear axis would flatten the faster ones onto the baseline. Hover the chart for per-interval values.
Reading the results
XMQ is the fastest of the three measured this round at 1.29 ms, against FlashMQ's 2.06 ms and EMQX's 4.04 ms. All three hold the full 250,000 messages a second, so this is a comparison of latency and efficiency rather than of capacity.
XMQ runs unpinned, like the others: 347% of the 1600% available.
EMQX and Mosquitto are not re-verified this round. Their figures below - EMQX 5.8.9 at 4.04 ms, Mosquitto reaching 104,604/s of the 250,000 offered with latency growing linearly from 8.5 s to 165.9 s on its single event-loop thread — a ceiling that does not move with better hardware - predate an unrelated measurement anomaly found on EMQX 6.3.1 on a different scenario, and are held pending that review rather than replaced with unchecked new ones.
Memory is where the brokers separate most. XMQ and FlashMQ both peak under 60 MB, against EMQX's 430 MB and Mosquitto's 2.52 GB. Fan-out holds only 1,005 connections, so almost none of that is session state: it is what the delivery path buffers on the way through.
The load generator was never the limit. At 250,000 messages/second the client has to receive and timestamp every message, so it could plausibly have been the bottleneck rather than the broker. It peaked at 442% of the 1600% available — about 28% of the client machine — so these results measure the brokers.
If you have any questions or comments regarding this page feel free to drop a line to Alexey Parshin. Design by Michael Perlov.