kafka 操作:
source /etc/profile
查看消费:
/usr/local/platform/kafka_2.11-1.1.0/bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic all.log_impbus_impressions_deferred_pricing.0.proto --from-beginning
添加生产:
/usr/local/platform/kafka_2.11-1.1.0/bin/kafka-console-producer.sh --broker-list localhost:9092 --topic all.log_impbus_impressions_deferred_pricing.0.proto
查看偏移量:
/usr/local/platform/kafka_2.11-1.1.0/bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list localhost:9092 --topic all.log_impbus_impressions_deferred_pricing.0.proto --time -2
查看topic
/usr/local/platform/kafka_2.11-1.1.0/bin/kafka-topics.sh --list --zookeeper localhost:2181
清除:./clean-all-logs.sh
查看端口:telnet localhost 9092
原文地址:https://www.cnblogs.com/jiashengyang/p/10456578.html