Broker comparisons usually put one number next to each name: Kafka does a million messages a second, Redis is faster still, RabbitMQ is slow. Those numbers mostly measure one setting, when the broker writes a message to disk before saying it has it, and that setting is rarely the same across the brokers being compared. This benchmark runs Kafka, NATS JetStream, RabbitMQ and Redis Streams on one machine, on the same cores and the same disk, each at the durability levels it offers, and measures what each level costs and what it buys.
Every message carries its sequence number and a payload derived from it, and every consumer checks every byte: 1,126,740,946 delivered messages, 0 corrupted, 0 duplicated.
Setup
Details
Brokers
Kafka 4.3.1 (apache/kafka, KRaft, one combined broker and controller, JVM heap at the image default of 1 GB) · NATS 2.15.2 with JetStream · RabbitMQ 4.4.0 (Erlang/OTP 29) · Redis 8.10.3 · official images pinned by digest, one broker running at a time, single node, no replication
Clients
One Go 1.26 program with each broker’s usual Go library: franz-go 1.22 (Kafka), nats.go 1.55 (NATS), amqp091-go 1.16 (RabbitMQ), go-redis 9.23 (Redis)
What a producer waits for
Every message is acknowledged by the broker: Kafka acks=all, JetStream’s PubAck, RabbitMQ publisher confirms, the reply to Redis XADD · at most 1,000 unacknowledged messages per producer for all four · no compression (Kafka’s client default of Snappy switched off; the payloads are random bytes) · Kafka’s linger set to 0 like the others
Topology
One topic, stream or queue per test, one partition: Kafka a 1-partition topic, NATS one stream, RabbitMQ a fanout exchange with one queue per consumer, Redis one stream key
CPU
AMD Ryzen AI Max+ 395 · cores 0–7 and their SMT siblings reserved for the benchmark (system services and movable IRQs moved to the other CCD) · broker on cores 0–3 (4 cores, 8 threads), clients on cores 4–7
Storage
One directory on an NVMe SSD (ext4), emptied before every broker start · the SSD is shared with other workloads on this machine, which shows in the fsync-bound numbers · the broker’s files are fsynced before every test, so no test starts with the previous one’s writes pending
Network
Loopback only: brokers and clients share one network namespace. This is a broker benchmark; there is no link emulation
Method
Every value is 10 runs, each a fresh client process · reported value: median of the runs (mean of the two middle ones), with min–max · latency percentiles per run, then the median across runs
Three durability levels
“Durable” means different things in each broker’s defaults. The table lines them up by when the data reaches the disk relative to the acknowledgement the producer waits for:
Durability
Kafka
NATS JetStream
RabbitMQ
Redis Streams
fsync before the acknowledgement
topic flush.messages=1: fsync after every append, before the produce response
sync_interval: always
quorum queue (fsyncs its log before confirming; cannot be turned off) · classic durable queue with persistent messages (confirmed once persisted to disk, per RabbitMQ’s documentation)
appendfsync always
fsync later, in the background
the default: written to the page cache, the OS writes it out whenever it likes; Kafka relies on replication for durability, and there is none on one node
the default: written to the file at once, fsync every 2 minutes
—
appendfsync everysec (the default when the AOF is on)
memory only
—
memory stream
— (transient queues are deprecated)
no AOF, no RDB snapshots
Ten configurations in all; the charts below keep this colour code: dark for fsync before the acknowledgement, light for fsync later, grey for memory only.
The scoreboard
Each broker at two levels, its default and fsync before every acknowledgement (both RabbitMQ queue types fsync first), against the number everyone quotes, Kafka on the page cache. The memory-only configurations are in the sections.
Eight headline measures from the sections below for each broker's default and its fsync-before-acknowledgement setting, each configuration's median as a multiple of the best median for that measure (1×; log scale, a longer bar is worse), labelled with the measured value. Median of 10 process runs; grey line: lowest to highest run. Throughput: one producer, one consumer; latency: 1 KiB messages on a fixed schedule, publish to delivery, left out where the schedule was not kept; disk: a backlog with no consumer.Eight headline measures from the sections below for each broker's default and its fsync-before-acknowledgement setting, each configuration's median as a multiple of the best median for that measure (1×; log scale, a longer bar is worse), labelled with the measured value. Median of 10 process runs; grey line: lowest to highest run. Throughput: one producer, one consumer; latency: 1 KiB messages on a fixed schedule, publish to delivery, left out where the schedule was not kept; disk: a backlog with no consumer.
Measure
Kafka, OS writeback
Kafka, fsync each write
NATS, fsync every 2 min
NATS, fsync each write
RabbitMQ, classic queue
RabbitMQ, quorum queue
Redis, fsync every second
Redis, fsync each write
Messages/s, 100 B
2.46M 2.36M–2.48M
171k 150k–186k · 0.07×
326k 323k–332k · 0.13×
2.2k 268–2.3k · 0.0009×
153k 146k–160k · 0.062×
104k 99k–106k · 0.042×
735k 657k–744k · 0.30×
167k 39k–177k · 0.068×
Messages/s, 1 KiB
1.96M 1.82M–2.05M
168k 151k–175k · 0.085×
250k 248k–254k · 0.13×
2.1k 537–2.2k · 0.0011×
132k 130k–135k · 0.067×
92k 81k–92k · 0.047×
444k 369k–451k · 0.23×
31k 28k–32k · 0.016×
Messages/s, 10 KiB
274k 206k–299k
64k 34k–64k · 0.23×
92k 90k–95k · 0.34×
2.0k 356–2.0k · 0.0072×
86k 85k–87k · 0.31×
50k 16k–55k · 0.18×
89k 64k–106k · 0.33×
9.0k 4.0k–9.1k · 0.033×
Latency p50 at 10k msg/s
36 µs 35–37 µs
5.36 ms 5.20–123 ms · 0.0067×
25 µs 24–25 µs · 1.5×
not sustained
33 µs 31–33 µs · 1.1×
861 µs 832 µs–68.7 ms · 0.042×
15 µs 14–15 µs · 2.4×
774 µs 763 µs–160 ms · 0.046×
Latency p99 at 10k msg/s
94 µs 82 µs–117 ms
8.03 ms 6.68–687 ms · 0.012×
43 µs 42 µs–7.73 ms · 2.2×
not sustained
83 µs 76–89 µs · 1.1×
3.92 ms 1.42–248 ms · 0.024×
55 µs 29 µs–122 ms · 1.7×
1.83 ms 1.47–1,129 ms · 0.051×
Latency p50 at 50k msg/s
49 µs 48–50 µs
5.47 ms 5.40–307 ms · 0.0089×
21 µs 21 µs · 2.3×
not sustained
57 µs 55–60 µs · 0.86×
1.15 ms 1.12–658 ms · 0.042×
13 µs 13 µs · 3.8×
not sustained
Disk per stored 100 B message
110 B 110 B
110 B 110–111 B · same
147 B 147 B · 0.75×
147 B 147–148 B · 0.75×
308 B 308 B · 0.36×
359 B 359 B · 0.31×
177 B 177 B · 0.62×
177 B 176–177 B · 0.63×
Disk per stored 1 KiB message
1,034 B 1,034 B
1,034 B 1,034 B · same
1,071 B 1,071 B · 0.97×
1,072 B 1,072–1,073 B · 0.97×
1,232 B 1,232 B · 0.84×
1,286 B 1,286 B · 0.80×
1,102 B 1,102 B · 0.94×
1,101 B 1,101 B · 0.94×
Median of 10 process runs, lowest to highest run beneath; bold: best in every run; after the range, the factor against Kafka, OS writeback: above 1× better than Kafka, OS writeback, below 1× worse, same: rounds to 1×.
Counting a measure only where every run agrees, against Kafka, OS writeback: Kafka, fsync each write is never better: worse on 5 (down to 0.0067× on latency p50 at 10k msg/s) and ties on 3; NATS, fsync every 2 min is better on 2 (up to 2.3× on latency p50 at 50k msg/s), worse on 5 (down to 0.13× on messages/s, 1 KiB) and ties on 1; NATS, fsync each write is never better: worse on all of its 5 (down to 0.0009× on messages/s, 100 B); RabbitMQ, classic queue is better on 1 (up to 1.1× on latency p50 at 10k msg/s), worse on 6 (down to 0.062× on messages/s, 100 B) and ties on 1; RabbitMQ, quorum queue is never better: worse on 7 (down to 0.042× on latency p50 at 10k msg/s) and ties on 1; Redis, fsync every second is better on 2 (up to 3.8× on latency p50 at 50k msg/s), worse on 5 (down to 0.23× on messages/s, 1 KiB) and ties on 1; Redis, fsync each write is never better: worse on all of its 7 (down to 0.016× on messages/s, 1 KiB). The sections below take each measure in turn, with the memory-only configurations, fan-out, the kill -9 test and the runs behind every median.
Each configuration's median against Kafka on the page cache, its default, on the same measure, log scale; above 1× it is better (more messages a second, lower latency or less disk). Median of 10 process runs.Each configuration's median against Kafka on the page cache, its default, on the same measure, log scale; above 1× it is better (more messages a second, lower latency or less disk). Median of 10 process runs.
Maximum throughput
One producer sends as fast as its 1,000-message window allows for 3 seconds while one consumer reads; the rate is messages delivered per second.
One producer sending as fast as 1,000 unacknowledged messages allow for 3 s, one consumer reading; messages delivered per second, median of 10 runs. Log scale. Every broker on the same 4 cores. The table below has 100 B and 10 KiB and the min–max.One producer sending as fast as 1,000 unacknowledged messages allow for 3 s, one consumer reading; messages delivered per second, median of 10 runs. Log scale. Every broker on the same 4 cores. The table below has 100 B and 10 KiB and the min–max.
Config
100 B
1 KiB
10 KiB
1 KiB in MB/s
Kafka, fsync each write
171k 150k–186k
168k 151k–175k
64k 34k–64k
172
Kafka, OS writeback
2.46M 2.36M–2.48M
1.96M 1.82M–2.05M
274k 206k–299k
2,008
NATS, fsync each write
2.2k 268–2.3k
2.1k 537–2.2k
2.0k 356–2.0k
2
NATS, fsync every 2 min
326k 323k–332k
250k 248k–254k
92k 90k–95k
256
NATS, memory stream
348k 345k–351k
299k 293k–302k
145k 142k–148k
306
RabbitMQ quorum queue
104k 99k–106k
92k 81k–92k
50k 16k–55k
94
RabbitMQ classic queue
153k 146k–160k
132k 130k–135k
86k 85k–87k
135
Redis, fsync each write
167k 39k–177k
31k 28k–32k
9.0k 4.0k–9.1k
32
Redis, fsync every second
735k 657k–744k
444k 369k–451k
89k 64k–106k
454
Redis, no persistence
954k 946k–957k
651k 643k–656k
175k 170k–178k
666
Inside one broker, the durability level alone moves throughput by an order of magnitude. Kafka delivers 1.96 M 1 KiB messages a second when it leaves writing to the OS, and 168k when it fsyncs every append; Redis goes from 651k with no persistence to 31k with appendfsync always. Comparing Kafka on the page cache with Redis fsyncing every write would put a 63× gap on the brokers that is really a gap between settings.
What separates the fsync-before-ack configurations is how many messages share one fsync:
Kafka fsyncs once per append, and one append is a whole batch from the producer, so with 1,000 messages in flight one fsync covers many of them: 168k a second.
RabbitMQ batches the same way: a quorum queue writes its log in batches and confirms everything one fsync covered (92k), and the classic queue does the same (132k).
Redis fsyncs once per pass of its event loop, before replying to everything that pass handled: 31k.
NATS with sync_interval: always fsyncs after every single message: 2.1k a second, about one fsync’s time per message on this SSD, whatever the size (2.2k at 100 B, 2.0k at 10 KiB).
Latency at a fixed rate
Throughput at saturation says little about latency at a normal load. Here the publisher follows a fixed schedule, 10,000 and then 50,000 1 KiB messages a second for 5 seconds, and each message’s latency runs from the moment it was scheduled to be sent until the consumer has it, so a publisher held back by a full window counts as late instead of quietly slowing down.
Publisher on a fixed schedule of 10,000 messages per second for 5 s; latency from the scheduled send time to the consumer, so a publisher held back by the broker counts as late. Bar: median; tick: 99th percentile; each the median of 10 runs. Log scale. Runs whose median was more than twice the reported one are noted. The table has the min–max and 50,000 messages per second.Publisher on a fixed schedule of 10,000 messages per second for 5 s; latency from the scheduled send time to the consumer, so a publisher held back by the broker counts as late. Bar: median; tick: 99th percentile; each the median of 10 runs. Log scale. Runs whose median was more than twice the reported one are noted. The table has the min–max and 50,000 messages per second.
Config
10k msg/s p50
p99
p99.9
50k msg/s p50
p99
p99.9
Kafka, fsync each write
5.36 ms 5.20 ms–123 ms kept up in 7 of 10 runs
8.03 ms
11.4 ms
5.47 ms 5.40 ms–307 ms kept up in 7 of 10 runs
8.25 ms
11.7 ms
Kafka, OS writeback
36 µs 35 µs–37 µs
94 µs
1.83 ms
49 µs 48 µs–50 µs
204 µs
2.04 ms
NATS, fsync each write
not sustained 2.2k msg/s delivered
–
–
not sustained 2.2k msg/s delivered
–
–
NATS, fsync every 2 min
25 µs 24 µs–25 µs
43 µs
258 µs
21 µs 21 µs–21 µs
167 µs
1.27 ms
NATS, memory stream
23 µs 23 µs–23 µs
39 µs
70 µs
20 µs 19 µs–20 µs
63 µs
151 µs
RabbitMQ quorum queue
861 µs 832 µs–68.7 ms
3.92 ms
13.9 ms
1.15 ms 1.12 ms–658 ms kept up in 9 of 10 runs
23.8 ms
43.2 ms
RabbitMQ classic queue
33 µs 31 µs–33 µs
83 µs
137 µs
57 µs 55 µs–60 µs
203 µs
402 µs
Redis, fsync each write
774 µs 763 µs–160 ms kept up in 8 of 10 runs
1.83 ms
6.10 ms
not sustained 31k msg/s delivered
–
–
Redis, fsync every second
15 µs 14 µs–15 µs
55 µs
17.5 ms
13 µs 13 µs–13 µs
62 µs
381 µs
Redis, no persistence
14 µs 14 µs–14 µs
35 µs
6.98 ms
12 µs 12 µs–12 µs
55 µs
250 µs
The fsync shows up in a consumer’s latency only where the broker hands a message to consumers after syncing it. Kafka exposes a message to readers once it is appended, and with flush.messages=1 the fsync is part of the append: 5.36 ms at the median, against 36 µs on the page cache. Redis writes its replies, XREAD included, only after the event loop’s fsync: 774 µs against 15 µs. A quorum queue delivers once its log entry is committed, which includes the fsync: 861 µs. A RabbitMQ classic queue, by contrast, passes the message to a waiting consumer straight away and confirms to the producer only once it is persisted: 33 µs end to end, the same as the brokers that never fsync. Its durability cost lands on the publisher’s confirm, which this test does not time.
The medians hide a spread between runs, and the SSD shared with other workloads is the likely reason: a quorum queue’s run medians ranged from 832 µs to 68.7 ms, and Kafka fsyncing each append kept its schedule in 7 of 10 runs at 10,000 a second. The table carries the min–max of every median.
A configuration counts as not sustained when the publisher falls a second behind its schedule, or latency keeps growing through the run (the median of the last fifth more than twice the first half’s plus 10 ms). Its percentiles would then measure a growing queue, not the broker, so the table shows the rate it did deliver instead.
Fan-out: one producer, many consumers
Every consumer receives every message: 1, 4 or 16 of them, 1 KiB messages, the producer again at full speed. Kafka’s consumers each read the one partition independently, NATS’s are ordered consumers on the stream, Redis’s each run their own XREAD; RabbitMQ has no shared log in these queue types, so a fanout exchange copies every message into one queue per consumer. Shown for the default durability of each broker plus both RabbitMQ queue types:
One producer at full speed for 3 s, every consumer receives every message (Kafka: independent readers of one partition; NATS: ordered consumers; RabbitMQ: a fanout exchange with one queue per consumer; Redis: XREAD per consumer). Rate of the slowest consumer, median of 10 runs.One producer at full speed for 3 s, every consumer receives every message (Kafka: independent readers of one partition; NATS: ordered consumers; RabbitMQ: a fanout exchange with one queue per consumer; Redis: XREAD per consumer). Rate of the slowest consumer, median of 10 runs.
The log-based brokers store a message once and hand the same bytes to every reader: Kafka still gives each of 16 consumers 783k messages a second, 12.53 M deliveries in total. RabbitMQ’s fanout writes, and fsyncs, one copy per queue: with 16 consumers its quorum queues deliver 10k a second to each.
Disk and memory per stored message
A broker holding a backlog, the consumer offline, pays in disk and memory for every message. Each run publishes up to 50,000 messages with no consumer to a fresh broker (the slowest configuration, NATS fsyncing every message, stops after 10 seconds at about 21,000), waits 2 seconds for background writes, and compares the data directory and the broker’s memory with the moment before.
20,788–50,000 messages published with no consumer to a fresh broker, then 2 s for background writes. Disk: allocated blocks in the data directory, after minus before, per message; for the memory-only configurations the broker's anonymous memory instead. Median of 10 runs; min to max across the runs is within 11 % of the median for every bar drawn. The table below has 1 KiB and 10 KiB and every configuration's memory, which is noisy for the brokers that keep messages in files.20,788–50,000 messages published with no consumer to a fresh broker, then 2 s for background writes. Disk: allocated blocks in the data directory, after minus before, per message; for the memory-only configurations the broker's anonymous memory instead. Median of 10 runs; min to max across the runs is within 11 % of the median for every bar drawn. The table below has 1 KiB and 10 KiB and every configuration's memory, which is noisy for the brokers that keep messages in files.
Config
100 B disk
100 B memory
1 KiB disk
1 KiB memory
10 KiB disk
10 KiB memory
Kafka, fsync each write
110 B
539 B 533 B–543 B
1,034 B
1,025 B 968 B–1,353 B
10.3 KB
7,002 B 6,653 B–7,110 B
Kafka, OS writeback
110 B
525 B 517 B–714 B
1,034 B
956 B 741 B–1,020 B
10.3 KB
6,980 B 6,965 B–7,183 B
NATS, fsync each write
147 B
603 B 519 B–1,374 B
1,072 B
1,123 B 1,041 B–4,418 B
10.3 KB
1,735 B 1,130 B–6,965 B
NATS, fsync every 2 min
147 B
555 B 546 B–582 B
1,071 B
468 B 436 B–495 B
10.3 KB
571 B 408 B–698 B
NATS, memory stream
0 B
505 B 480 B–533 B
0 B
1,679 B 1,612 B–1,817 B
0 B
12.8 KB 12.6 KB–13.8 KB
RabbitMQ quorum queue
359 B
800 B 655 B–907 B
1,286 B
1,738 B 1,663 B–1,945 B
10.5 KB
5,133 B 1,645 B–12.0 KB
RabbitMQ classic queue
308 B
444 B 103 B–783 B
1,232 B
497 B 74 B–818 B
10.5 KB
597 B 300 B–900 B
Redis, fsync each write
177 B
120 B 120 B–121 B
1,101 B
1,211 B 1,211 B–1,211 B
10.3 KB
12.5 KB 12.5 KB–12.5 KB
Redis, fsync every second
177 B
157 B 119 B–165 B
1,102 B
1,349 B 1,210 B–1,473 B
10.3 KB
12.5 KB 12.5 KB–12.8 KB
Redis, no persistence
0 B
118 B 118 B–119 B
0 B
1,207 B 1,207 B–1,207 B
0 B
12.5 KB 12.5 KB–12.5 KB
Disk is the payload plus each broker’s per-message framing: Kafka’s record batch headers and offset index (10 B above the payload at 100 B), NATS’s message headers with the subject (47 B), Redis’s AOF, which logs the XADD command itself (77 B), and RabbitMQ’s queue segment plus its write-ahead log (259 B for a quorum queue).
Memory is the broker’s own (anonymous) memory, not the page cache. Kafka and NATS on disk keep messages in files and let the kernel cache them, so their numbers are mostly heap and index growth, and noisy (the table carries each cell’s min–max): a garbage collector or allocator decides when memory is returned. The memory-only configurations hold everything themselves: 1,207 B per 1 KiB message in Redis, 1,679 B in a NATS memory stream.
Recovery after kill -9
The durability table is the brokers’ documentation. This part is measured: a publisher sends 1 KiB messages at 20,000 a second and records which ones the broker acknowledged; about one second in, the broker’s container is killed with SIGKILL, then started again on the same data directory, and a consumer reads back everything that survived.
Publisher at 20,000 messages per second (1 KiB); the broker container is killed with SIGKILL about 1 s in and restarted on the same data directory; a consumer then reads everything back. Lost: acknowledged messages that are gone, summed over 10 runs. The kernel and its page cache stay up, so this is a process crash, not a power cut.Publisher at 20,000 messages per second (1 KiB); the broker container is killed with SIGKILL about 1 s in and restarted on the same data directory; a consumer then reads everything back. Lost: acknowledged messages that are gone, summed over 10 runs. The kernel and its page cache stay up, so this is a process crash, not a power cut.
Config
Acknowledged before the kill
Lost after restart
Runs with loss
Kafka, fsync each write
20,422
0 0–0
0 of 10
Kafka, OS writeback
21,508
0 0–0
0 of 10
NATS, fsync each write
2,003
0 0–0
0 of 10
NATS, fsync every 2 min
21,441
0 0–0
0 of 10
NATS, memory stream
21,489
21,489 21,157–21,605
10 of 10
RabbitMQ quorum queue
21,182
0 0–0
0 of 10
RabbitMQ classic queue
21,368
0 0–0
0 of 10
Redis, fsync each write
21,269
0 0–0
0 of 10
Redis, fsync every second
21,564
0 0–0
0 of 10
Redis, no persistence
21,522
21,522 21,258–21,922
10 of 10
No configuration that writes to disk lost an acknowledged message, including the ones that fsync only in the background: Kafka on the page cache, NATS with its 2-minute sync, Redis with everysec. That is not luck. kill -9 ends the process, not the machine: whatever the broker had already handed to the kernel with write() sits in the page cache and reaches the disk later anyway. Every one of these brokers writes before it acknowledges; they differ in when they fsync, and fsync only matters if the kernel itself goes down. The memory-only configurations lost all 215,186 (Redis) and 214,567 (NATS) acknowledged messages, as they must.
Some messages the broker never acknowledged survived as well (5,020 across all runs): they were stored, but the acknowledgement died with the process. A producer that retries those will write them twice, which is why Kafka’s idempotent producer and NATS’s message deduplication exist.
So what does fsync-before-ack buy on one node? Protection against a kernel crash or a power cut, where the page cache is lost. This benchmark did not cut power, so it cannot say how much a background-fsync broker loses then; the 10 runs only show that a process crash costs none of them anything.
What this does not show
Power loss and kernel crashes. The only failure tested is a process crash. Losing the page cache needs a VM or a power switch; up to the last fsync interval (2 minutes for NATS’s default, 1 second for Redis everysec, whatever the kernel had not written for Kafka) is what is at stake there.
Replication. Every broker ran as a single node. Kafka, NATS and RabbitMQ quorum queues are designed to be durable through replicas on other machines, acknowledged by a majority before the producer hears back; that adds a network round trip and changes every number here.
Partitions and parallelism. One partition, one stream, one queue, one producer. Kafka in particular scales by spreading partitions over producers and consumers; so does NATS with more streams and RabbitMQ with more queues. These numbers are what one ordered sequence of messages can do.
A quiet disk. The SSD served other workloads during the run. The fsync-bound numbers (each fsync waits for the device) would be better on a dedicated disk and very different on a cloud volume, where an fsync can take milliseconds.
The network. Loopback has no bandwidth limit and microsecond round trips. Over a real network, a 10 KiB message at Kafka’s rates would need more than a 10 Gbit/s link.
Tuning. Defaults apart from the durability settings in the table. Each broker has knobs that move these numbers: Kafka’s batch size and linger, NATS’s write buffers, RabbitMQ’s prefetch and confirm batching, Redis’s I/O threads.
What the numbers say
Durability is the setting that decides throughput: within Kafka 12×, within Redis 21× between the fastest and the slowest level. Compare brokers at the same level, or the comparison measures the setting.
With fsync before every acknowledgement, the brokers that fsync whole batches lead: Kafka 168k, RabbitMQ 132k (classic) and 92k (quorum), Redis 31k 1 KiB messages a second. NATS fsyncs each message alone and manages 2.1k.
At 10,000 messages a second every broker that does not fsync first delivers in tens of microseconds (15 µs Redis, 25 µs NATS, 36 µs Kafka). Where delivery waits for the fsync it takes 774 µs (Redis) to 5.36 ms (Kafka); a RabbitMQ classic queue delivers before its fsync, in 33 µs.
Log-based brokers fan out cheaply, because every consumer reads one stored copy; a RabbitMQ fanout exchange stores a copy per queue.
kill -9 lost no acknowledged message in any configuration that writes to disk, fsync or not. What fsync protects against, a kernel crash or power cut, is a different test.
Reproduce it
The harness is one Go program with the four client libraries, two shell scripts that start the client container and one broker per durability configuration, and a driver script:
docker build -t brb . # Go 1.26 build, runs a self-test of the payload checks./net.sh 4-7 # client container on cores 4-7; brokers join its network./broker.sh kafka-sync 0-3 # empty data dir, Kafka with flush.messages=1 topics, cores 0-3docker exec bk-net bb ready -broker kafka -cfg kafka-syncdocker exec bk-net bb thr -broker kafka -cfg kafka-sync -size 1024 -dur 3sdocker exec bk-net bb lat -broker kafka -cfg kafka-sync -size 1024 -rate 10000 -dur 5s
Each run prints one JSON line: messages sent, acknowledged and received per consumer, duplicated, corrupted and missing, the rates, and for latency runs the percentiles and whether the schedule was kept.