# 查看Topic详细信息
kafka-topics --zookeeper localhost:2181/kafka -describe -topic topicName
# 创建Topic
kafka-topics --create -zookeeper localhost:2181/kafka --replication-factor 1 --partitions 1 --topic topicName
# 启动服务
kafka-server-start -daemon ../config/server.properties
# 从头消费消息
kafka-console-consumer --bootstrap-server dn03:9092 --zookeeper dn03:2181/kafka --topic topicName --from-beginning
# 生产消息
kafka-console-producer --broker-list dn03:9092 --topic topicName