(转)启动zookeeper、kafka
windows系统
启动zookeeper
也可以直接运行bin目录下的zookeeper-server.bat文件
bin\windows\zookeeper-server-start.bat config\zookeeper.properties
启动kafka,在kafka文件夹最外层目录下执行cmd
bin\windows\kafka-server-start.bat config\server.properties
Linux系统
启动zookeeper
bin/zookeeper-server-start.sh -daemon config/zookeeper.properties
启动kafka
nohup bin/kafka-server-start.sh config/server.properties 1>/dev/null 2>&1 &
创建主题
bin\windows\kafka-topics.bat --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic lottery_invoice