赞
踩
示例:给topic为 ids-test 造数
./kafka-console-producer.sh --broker-list ip:9092 --topic ids-test
./kafka-console-consumer.sh --bootstrap-server ip:9092 --topic topic的名字
./kafka-console-consumer.sh --bootstrap-server ip:9092 --topic topic的名字 --from-beginning
./kafka-console-consumer.sh --bootstrap-server ip:9092 --topic topic的名字 --from-beginning | grep IP地址
./kafka-console-consumer.sh --bootstrap-server ip:9092 --topic topic名字 > /tmp/1.log
如果针对多次输入内容,希望添加到同一个文件内,需要将>修改为>>表示追加,但在不熟悉的时候不建议使用;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。