共计 610 个字符,预计需要花费 2 分钟才能阅读完成。
https://kafka.apache.org/down…
作用 | 命令 | 形容 |
---|---|---|
启动 ZK | bin/zookeeper-server-start.sh -daemon config/zookeeper.properties | Kafka 安装包自带 ZK,能够单节点启动 |
启动 Kafka 服务器 | bin/kafka-server-start.sh config/server.properties | |
创立 Topic(test) | bin/kafka-topics.sh –create –zookeeper localhost:2181 –replication-factor 1 –partitions 1 –topic test | |
Topic 列表 | bin/kafka-topics.sh –list –zookeeper localhost:2181 | |
启动 Producer | bin/kafka-console-producer.sh –broker-list localhost:9092 –topic test | |
启动 Consumer | bin/kafka-console-consumer.sh –bootstrap-server localhost:9092 –topic test –from-beginning | |
Topic 相干信息(test) | bin/kafka-topics.sh –describe –zookeeper localhost:2181 –topic test | 启动 ZK |
正文完