Three brokers, one group.

The brokers profile is the smallest setup that can lose a process and still commit metadata. It is not a Kafka listener. The single-broker image is the one that opens port 9092.

docker compose --profile brokers up

What comes up

Compose builds MinIO and three brokers from this repo. The broker command is flags only: a node id, an HTTP address, and a data directory. An init container waits, then posts /admin/init to the first broker with all three members.

[{"id":1,"addr":"broker-1:18001"},
 {"id":2,"addr":"broker-2:18002"},
 {"id":3,"addr":"broker-3:18003"}]

Those addresses are the HTTP admin ports, which is what the Raft group dials. Published host ports are 18001, 18002, and 18003. After init, GET /admin/metrics on any of them should show a current_leader.

There is no Kafka port yet

The compose services do not pass --kafka-addr. Nothing is published on 9092. To attach a client, run the one-broker image, or add --kafka-addr to the command yourself and publish that port. --dev-plaintext on a non-loopback address also needs --allow-non-loopback.

What this group is for

Metadata writes commit through a majority. The cluster test does the same thing without Docker: three processes, one committed write, kill the leader, and a new write still commits. That test is described on the tests page. Losing a majority of a write-ahead log shard is a different failure, and it needs recovery.