Run a single-node Apache Kafka broker in KRaft mode for message testing.
24
Run a single-node Apache Kafka broker in KRaft mode for message testing.
/opt/kafka/bin/| Tag | Meaning | Platform |
|---|---|---|
latest | Latest successful main build | linux/amd64 |
docker pull stden/kafka:latest
docker run -d -p 127.0.0.1:9092:9092 --name kafka stden/kafka:latest
Wait for the broker to accept connections:
docker exec kafka /opt/kafka/bin/kafka-broker-api-versions.sh \
--bootstrap-server localhost:9092
Create a topic and send a message:
docker exec kafka /opt/kafka/bin/kafka-topics.sh \
--create --topic demo --bootstrap-server localhost:9092
echo "hello" | docker exec -i kafka \
/opt/kafka/bin/kafka-console-producer.sh \
--bootstrap-server localhost:9092 --topic demo
CI builds the image and verifies the Kafka scripts are in place. The local test starts the broker, creates a topic, produces a message, and consumes it.
Content type
Image
Digest
sha256:5581882d8…
Size
227.8 MB
Last updated
1 day ago
docker pull stden/kafka