Kafka Commands - keshavbaweja-git/guides GitHub Wiki
# List topics
kafka-topics --list --bootstrap-server localhost:9092
# Create topic
kafka-topics --create --topic topic1 --bootstrap-server localhost:9092
# Describe topic
kafka-topics --describe --topic topic1 --bootstrap-server localhost:9092
# Publish message
kafka-console-producer --topic topic1 --bootstrap-server localhost:9092
# Consume message
kafka-console-consumer --topic topic1 --from-beginning --bootstrap-server localhost:9092