Kafka消费

// 位移最早 -2
./kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list IP:端口 --topic ky_data_ods_hs_opt_dispatch --time -1
// 位移最早 -1
./kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list IP:端口 --topic ky_data_ods_hs_opt_dispatch --time -2

./kafka-topics.sh --list --zookeeper IP:端口
./kafka-topics.sh --bootstrap-server IP:端口 --list
./kafka-topics.sh --bootstrap-server IP:端口 --describe --topic ky_data_ods_hs_opt_dispatch

/kafka_2.12-2.2.1/bin/kafka-console-consumer.sh --topic topic_name --bootstrap-server IP:端口 --from-beginning --partition 0 >> /home/apps/kafka.log.0

./kafka-console-consumer.sh --topic topicname–bootstrap-server IP:端口, --from-beginning --partition 0 >> /kafka0115001.log

./kafka-console-consumer.sh --topic ky_data_kymain_hs_opt_hewb --bootstrap-server IP:端口, --from-beginning --partition 0 >> /kafka0115002.log

猜你喜欢

转载自blog.csdn.net/qq_41568648/article/details/129261928