kafka 常用


kafka由三部分组成,生产者,broker ,消费者

[root@VM-24-2-centos kafka]# bin/kafka-console-consumer.sh --topic test1 --from-beginning --bootstrap-server localhost:9092 --from-beginning

就把历史数据拿到

kafka集成springboot 

生产者

 消费者

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

bin\windows>kafka-console-consumer.bat --bootstrap-server 101.42.236.203:9092 --topic test --from-beginning