KestrelMQ Event Stream Broker
KestrelMQ is a compact, append-only log broker built for high-fanout telemetry ingestion and deterministic replay in edge Kubernetes clusters. Written with zero-copy segmented disk logs and HTTP/2 gRPC ingestion, a single broker handles over 250,000 events/sec under 128 MiB RSS.
2. Partitioning & Retention
Topics split into fixed-count ordered partitions backed by 64 MiB rolling segment files. Producers hash routing keys with xxHash64 to guarantee per-entity ordering while scaling consumer concurrency horizontally.
| Parameter | Default | Notes |
|---|---|---|
segment.bytes | 67108864 | Rolls active log segment at 64 MiB |
retention.hours | 168 | 7-day time-based segment pruning |
acks | leader | Wait for local fsync batch commit |
3. Quickstart
curl -fsSL https://get.kestrelmq.example/install.sh | sudo sh
sudo kestrelmq-broker --config /etc/kestrelmq/broker.yaml
kestrelctl topic create events.telemetry --partitions 8
4. Broker Configuration
broker:
node_id: ap-northeast-1a
listen: 127.0.0.1:9094
storage:
data_dir: /var/lib/kestrelmq/segments
index_interval_bytes: 4096
flush_interval_ms: 250
5. Consumer Groups
Consumer groups track committed offsets per partition inside an internal compacted topic
(__consumer_offsets). Rebalances complete in under 200 ms using cooperative sticky assignment.
6. Operations & Metrics
Inspect broker lag and disk watermarks via GET /metrics or kestrelctl group describe.
Keep at least 20% free disk headroom to allow safe background segment compaction.