在初学kakfa-python时,编写生产者消费者程序遇到如题问题:
请务必打开本地zookeeper和kafka服务:
开启zookeeper:
.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.Properties
开启kafka服务:
D:\app\kafka>.\bin\windows\kafka-server-start.bat .\config\server.properties
创建topic(sqltopic为我的topic名字)
.\bin\windows\kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic sqltopic