You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JMH benchmarks for the outbox framework, measuring write throughput, hot-path dispatch latency, and poller throughput.
Benchmarks
Benchmark
Metric
Parameters
OutboxWriteBenchmark
Throughput (ops/sec)
payloadSize: 100, 1000, 10000 bytes
OutboxDispatchBenchmark
Average latency (µs)
payloadSize: 100, 1000, 10000 bytes
OutboxPollerBenchmark.pollAndMarkDone
Throughput (ops/sec)
batchSize: 10, 50, 200 events
OutboxPollerBenchmark.claimAndMarkDone
Throughput (ops/sec)
batchSize: 10, 50, 200 events
All benchmarks support database parameter: h2 (default), mysql, or postgresql.
Implementation Notes
Connection pooling: MySQL and PostgreSQL benchmarks use HikariCP (max 10, min idle 2). H2 stays unwrapped (
in-memory, negligible connection overhead).
Sample Results (H2, JDK 21)
Single-threaded, 2s warmup x 2, 2s measurement x 3, 1 fork. MacBook environment — not a stable benchmarking host;
numbers are indicative, not authoritative.
Write Throughput
Payload Size
Throughput (ops/s)
Error (99.9%)
100 B
152,146
± 43,103
1,000 B
139,973
± 117,934
10,000 B
103,537
± 179,220
Dispatch Latency
Payload Size
Avg Latency (µs/op)
Error (99.9%)
100 B
9,124
± 2,789
1,000 B
9,173
± 1,293
10,000 B
9,152
± 149
Poller Throughput — pollAndMarkDone
Batch Size
Throughput (ops/s)
Error (99.9%)
10
434
± 1,340
50
195
± 623
200
99
± 345
Poller Throughput — claimAndMarkDone
Batch Size
Throughput (ops/s)
Error (99.9%)
10
599
± 2,021
50
272
± 801
200
125
± 422
Sample Results (MySQL 9.6, JDK 21)
Single-threaded, 2s warmup x 2, 2s measurement x 3, 1 fork. MacBook environment with local MySQL (HikariCP, max 10) —
numbers are indicative, not authoritative.
Write Throughput
Payload Size
Throughput (ops/s)
Error (99.9%)
100 B
3,622
± 2,560
1,000 B
3,211
± 401
10,000 B
868
± 6,430
Dispatch Latency
Payload Size
Avg Latency (µs/op)
Error (99.9%)
100 B
9,563
± 1,247
1,000 B
9,696
± 2,182
10,000 B
9,860
± 1,101
Poller Throughput — pollAndMarkDone
Batch Size
Throughput (ops/s)
Error (99.9%)
10
229
± 1,167
50
74
± 302
200
17
± 46
Poller Throughput — claimAndMarkDone
Batch Size
Throughput (ops/s)
Error (99.9%)
10
413
± 137
50
103
± 154
200
26
± 31
Sample Results (PostgreSQL 17, JDK 21)
Single-threaded, 2s warmup x 2, 2s measurement x 3, 1 fork. MacBook environment with Docker PostgreSQL 17 (HikariCP,
max 10) — numbers are indicative, not authoritative.