文章目录
1. 启动
#常规模式启动,可以查看控制台输出
bin/kafka-server-start.sh config/server.properties
#后台启动
bin/kafka-server-start.sh -daemon config/server.properties
2. 创建主题
# bin/kafka-topics.sh --create --zookeeper localhost:2181/kafka --replication-factor 1 --partitions 3 --topic nginx_access_log
WARNING: Due to limitations in metric names, topics with a period ('.') or underscore ('_') could collide. To avoid issues it is best to use either, but not both.
Created topic nginx_access_log.
3. 查看主题列表
# bin/kafka-topics.sh --zookeeper localhost:2181/kafka --list
nginx_access_log
4. 查看主题信息