Kafka
official ● signeddoze/kafka A local, disk-backed broker that speaks enough of the Kafka wire protocol that unmodified clients (franz-go, kcat, Sarama, the Java client) connect and work. No JVM, no ZooKeeper, no KRaft — the engine is doze-kafka, embedded in the module, and `version` selects the Kafka protocol profile it advertises (1–4). Declare topics and doze converges them on boot; auto-create handles the rest.
Usage
Drop it in doze.hcl and run doze up.
kafka "events" {
version = 4
port = 9092
auto_create_topics = true
default_partitions = 1
retention = "168h"
topic "orders" {
partitions = 3
}
topic "payments" {
partitions = 1
config = { "cleanup.policy" = "compact" }
}
} Versions you can run
The version = you write selects the advertised protocol profile — the engine is built in, no download.
Configuration
Arguments and nested blocks the engine accepts — generated from the module itself, so it can't drift.
| Name | Type | Default | Description |
|---|---|---|---|
| version REQ | number | — | Advertised Kafka protocol profile — 1, 2, 3, or 4. |
| auto_create_topics | bool | true | Create unknown topics on first reference. |
| default_partitions | number | 1 | Partition count for auto-created topics. |
| retention | string | — | Delete segments older than this (Go duration, e.g. "168h"); empty = unbounded. |
| retention_bytes | number | — | Delete old segments once a partition exceeds this size (0 = unbounded). |
topic"<name>" { }
nested block · repeatableA topic to create on boot.
| Name | Type | Default | Description |
|---|---|---|---|
| partitions | number | 1 | Partition count. |
| config | map(string) | — | Per-topic config (e.g. cleanup.policy = compact). |
Under the hood — module releases you never write these; doze picks and pins automatically
The plugin releases that provide this engine. doze selects the newest one compatible with your doze and your declared versions, pins it in doze.lock, and the index is cumulative — older releases stay resolvable for pinned lockfiles. modules { kafka { version = "…" } } pins one exactly (the escape hatch for bisecting a regression).
| release | protocol | engine support | platforms |
|---|---|---|---|
| 0.1.1 stable | 1 | 1 · 2 · 3 · 4 | 3 platforms |
| 0.1.0 | 1 | 1 · 2 · 3 · 4 | 3 platforms |
raw signed data: index.yaml ↗ · meta.yaml ↗