Start kafka locally
Course: Kafka - chapter 3
Ref - https://kafka.apache.org/quickstart
Using docker
Section titled “Using docker”docker run -p 9092:9092 apache/kafka:3.7.1Get shell access to container
Section titled “Get shell access to container”docker psdocker exec -it container_id /bin/bashcd /opt/kafka/binCreate a topic
Section titled “Create a topic”./kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:9092Publish to the topic
Section titled “Publish to the topic”./kafka-console-producer.sh --topic quickstart-events --bootstrap-server localhost:9092Consuming from the topic
Section titled “Consuming from the topic”./kafka-console-consumer.sh --topic quickstart-events --from-beginning --bootstrap-server localhost:9092