File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -455,11 +455,10 @@ socket.request.max.bytes=104857600
455
455
- 后台方式运行 kafka 服务:`cd /usr/local/kafka && bin/kafka-server-start.sh -daemon config/server.properties`
456
456
- 停止 kafka 服务:`cd /usr/local/kafka && bin/kafka-server-stop.sh`
457
457
- 再开一个终端测试:
458
- - 进入目录:`cd /usr/local/kafka`
459
- - 创建 topic 命令:`bin/kafka-topics.sh --create --zookeeper youmeekhost:2181 --replication-factor 1 --partitions 1 --topic my-topic-test`
460
- - 查看 topic 命令:`bin/kafka-topics.sh --list --zookeeper youmeekhost:2181`
461
- - 删除 topic:`bin/kafka-topics.sh --delete --topic my-topic-test --zookeeper youmeekhost:2181`
462
- - 给 topic 发送消息命令:`bin/kafka-console-producer.sh --broker-list youmeekhost:9092 --topic my-topic-test`,然后在出现交互输入框的时候输入你要发送的内容
458
+ - 创建 topic 命令:`cd /usr/local/kafka && bin/kafka-topics.sh --create --zookeeper youmeekhost:2181 --replication-factor 1 --partitions 1 --topic my-topic-test`
459
+ - 查看 topic 命令:`cd /usr/local/kafka && bin/kafka-topics.sh --list --zookeeper youmeekhost:2181`
460
+ - 删除 topic:`cd /usr/local/kafka && bin/kafka-topics.sh --delete --topic my-topic-test --zookeeper youmeekhost:2181`
461
+ - 给 topic 发送消息命令:`cd /usr/local/kafka && bin/kafka-console-producer.sh --broker-list youmeekhost:9092 --topic my-topic-test`,然后在出现交互输入框的时候输入你要发送的内容
463
462
- 再开一个终端,进入 kafka 容器,接受消息:`cd /usr/local/kafka && bin/kafka-console-consumer.sh --bootstrap-server youmeekhost:9092 --topic my-topic-test --from-beginning`
464
463
- 此时发送的终端输入一个内容回车,接受消息的终端就可以收到。
465
464
- Spring Boot 依赖:
You can’t perform that action at this time.
0 commit comments