kafka basic commands

kafka-quickstart

create topic 

kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test




publish message to topic 

kafka-console-producer.sh --broker-list localhost:9092 --topic test

subscribe topic 

kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning

你可能感兴趣的:(kafka basic commands)