/kafka-docker

✉️ A quick way to get a local Kafka instance up and running with Docker

GNU General Public License v3.0GPL-3.0

✉️ Kafka on Docker

A quick way to get a local Kafka instance up and running with Docker.

Related blog post: https://sahansera.dev/setting-up-kafka-locally-for-testing/

Usage

Run at the root:

docker-compose up -d

Producer

docker exec --interactive --tty broker \
kafka-console-producer --bootstrap-server localhost:9092 \
                       --topic example-topic

Consumer

docker exec --interactive --tty broker \
kafka-console-consumer --bootstrap-server localhost:9092 \
                       --topic example-topic \
                       --from-beginning