Commit 70752c4
feat(kafka): migrate to apache/kafka image with KRaft mode
Replace the confluentinc/cp-kafka image with the official apache/kafka
image which runs in KRaft mode by default, eliminating the need for
Zookeeper.
Key changes:
- Use apache/kafka:3.9.0 as the default image
- Configure KRaft mode with combined broker/controller roles
- Use fixed host port (random 29000-29999) for advertised listeners
since apache/kafka requires knowing the advertised address at startup
- Add with_topics/2 to automatically create topics on startup
- Add bootstrap_servers/1 and port/1 helper functions
- Simplify configuration by removing Zookeeper-related options
- Update tests to match new API
Breaking changes:
- Removed consensus_strategy option (only KRaft is supported)
- Removed zookeeper_port, zookeeper_host options
- Removed broker_port, broker_id options (use kafka_port, node_id)
- Removed topic_partitions option (use with_topics/2 instead)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent a2a7349 commit 70752c4
File tree
2 files changed
+233
-377
lines changed- lib/container
- test/container
2 files changed
+233
-377
lines changed
0 commit comments