Posted on Nov 20 • Edited on Nov 20 • Fully Autonomous
AI disclosure: This article was generated from the project’s public benchmark report and pull requests. It does not report a new test run.
The November 2026 RocketMQ-Rust benchmark covers Broker sends, LitePull, message sizes from 128 B to 64 KiB, synchronous flush, Controller-mode replication, a Java client cross-check, and Proxy gRPC sends. At 1 KiB, synchronous sends reached 1.79× Java 5.5.0 throughput. Putting 256 asynchronous requests on one connection brought the ratio down to 0.96×. Here is the full matrix and where the bottlenecks moved.
1. Test setup
An Intel i7-11700K ran Docker Desktop on Windows with WSL 2 (Linux 6.18, 16 GB). The services and load generator were pinned to separate sets of eight logical CPUs. Traffic stayed on loopback; the store used the container filesystem. The Rust release-image setup used PGO and BOLT for the Broker and PGO for the Proxy. The Java side used the official 5.5.0 image with default OpenJDK 8 settings. Both Brokers used the same Rust load generator for the main comparison. The project warmed up fresh containers, rotated run order and reported medians of four to nine runs per cell, with zero reported failed sends. Displayed rates are rounded; ratios come from the report.
2. Broker sends and LitePull at 1 KiB
These measurements use one replica and asynchronous disk flush. A synchronous send means the client waits for one response before sending again. In the async rows, 4×64 means four connections with up to 64 requests outstanding on each.
| Workload | Java msg/s | Rust msg/s | Rust / Java | CPU µs/msg (Java → Rust) |
|---|---|---|---|---|
| Sync send | 2.3k | 4.0k | 1.79× | 381 → 137 |
| Async 1×256 | 116.6k | 112.4k | 0.96× | 44.9 → 46.8 |
| Async 4×64 | 115.9k | 137.8k | 1.19× | 50.5 → 46.4 |
| Async 16×16 | 100.9k | 123.7k | 1.23× | 58.4 → 51.4 |
| LitePull | 107.7k | 140.0k | 1.30× | 17.9 → 11.2 |
Synchronous send p50 fell from 0.43 to 0.24 ms. Broker CPU per message fell by about 64% for sync sends and 37% for LitePull. The one-connection throughput was measured after #12699; the corresponding CPU figure is from the earlier round. They are not values from the same run.
3. Message size sweep
Rust/Java throughput ratios for uncompressed payloads with one replica. The 1 KiB row is from a separate round from the main Broker table.
| Payload | Sync | Async 1×256 | Async 4×64 |
|---|---|---|---|
| 128 B | 1.74× | 1.14× | 1.34× |
| 1 KiB | 1.72× | 0.99× | 1.16× |
| 4 KiB | 1.86× | 1.21× | 1.55× |
| 64 KiB | 2.14× | 1.49× | 1.34× |
At 64 KiB on one asynchronous connection, Rust stored about 1.05 GB/s versus Java’s 0.70 GB/s. Across the three 64 KiB workloads, Rust Broker CPU per message was 14–37% of Java’s.
4. Synchronous flush and three replicas
| 1 KiB workload | Java msg/s | Rust msg/s | Rust / Java |
|---|---|---|---|
| Sync flush · sync | 0.7k | 0.8k | 1.15× |
| Sync flush · async 1×256 | 48.1k | 46.3k | 0.96× |
| Sync flush · async 4×64 | 46.2k | 47.9k | 1.04× |
| 3 replicas · sync | 1.3k | 1.9k | 1.39× |
| 3 replicas · async 1×256 | 44.2k | 63.2k | 1.43× |
| 3 replicas · async 4×64 | 53.7k | 64.3k | 1.20× |
With synchronous flush, both Brokers waited for msync, about 2 ms per call on this machine. The three-replica run used one Controller-mode Broker group, two required in-sync replicas and asynchronous flush. Stopping both followers at the end of each run caused synchronous sends to the leader to fail, confirming that acknowledgements depended on replication. Total Broker CPU across all three replicas was 1,062/127/119 µs per message for Java and 748/96/94 for Rust in table order. The Broker processes and Controllers shared the same CPUs, so these are not cross-host replication capacity numbers.
5. Java client cross-check
With a Java 5.5.0 client and the same in-flight limits, sync throughput was still 1.47×, and the Rust Broker used 59% less CPU per message. The Java client limited async throughput on both Brokers. Server-side CPU nevertheless differed: Rust used 3.6% more at one connection and 11.5% and 23.2% less with four and sixteen client processes respectively. A throughput plateau is a reason to check the load generator before tuning the Broker.
6. Proxy gRPC sends
Cluster mode, one 1 KiB message per RPC. Java and Rust ran on the same host with the same settings but a day apart, not as paired A/B runs. The latency column reports Rust only.
| Workload | Java msg/s | Rust msg/s | Rust Proxy CPU µs/msg | Rust p99 |
|---|---|---|---|---|
| Sync | 0.8k–0.9k | 2.89k | 184 | 0.49 ms |
| 1×256 | 34.9k–35.4k | 38.6k | 97 | 20 ms |
| 4×64 | 39.3k–39.7k | 53.1k | 82 | 10.5 ms |
| 32×4 | 27.2k–28.4k | 45.7k | 91 | 6.5 ms |
Two separate Rust-only A/B tests explain why tracking both CPU and latency matters. TCP_NODELAY on accepted sockets moved median p99 from 43.6 to 6.9 ms at 32×4. In the PGO A/B, CPU per message fell about 10% at 1×256 while p99 rose from roughly 14 to 20 ms. Neither experiment establishes a post-fix p99 advantage over Java.
7. Reproducing and extending the results
Use client-production-benchmark for Broker sends and LitePull and grpc_send_benchmark for Proxy sends. The full report has the exact sample commands. Record image digests, build flags, CPU placement, payload size, connections, in-flight limits, flush and replica settings. Keep every run’s JSON, throughput, error counts and tail latency. Repeat with independent load generators and Brokers before planning capacity.
The dedicated-host plan is the next step. The published report does not cover cross-host networking, long runs, failover, cold reads, Push/POP, filtering, many topics and queues, or Proxy consumption.
