topic partition kafka code example
Example 1: kafka create topic
$ bin/kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:9092
Example 2: kafka console consumer read topic
$ bin/kafka-console-consumer.sh --topic quickstart-events --from-beginning --bootstrap-server localhost:9092
This is my first event
This is my second event