Ready to use kafka environment.
Run the startup.sh
script, which:
- Builds the image
- Runs the container from the freshly built image
- Runs SSH with the kafka being a workdir
For us to be able to send and receive events, we need:
- Zookeeper being started
- Kafka broker being started
- Topic being created
- Producer + Consumer being up and ready
docker exec -it kafka /bin/bash -i
bin/zookeeper-server-start.sh config/zookeeper.properties
bin/kafka-server-start.sh config/server.properties
bin/kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:9092
bin/kafka-console-producer.sh --topic quickstart-events --bootstrap-server localhost:9092
bin/kafka-console-consumer.sh --topic quickstart-events --from-beginning --bootstrap-server localhost:9092