boot+kafka
时间: 2023-08-06 11:09:58 浏览: 113
回答: 在使用Spring Boot和Kafka进行开发时,需要先下载Zookeeper和Kafka的镜像,并进行单机方式启动Zookeeper。可以使用以下命令下载和启动Zookeeper镜像:docker pull wurstmeister/zookeeper 和 docker run -d --name zookeeper -p 2181:2181 -t wurstmeister/zookeeper。接下来,可以启动Kafka并创建topic。在Spring Boot中配置Kafka时,可以使用kafka-console-consumer.sh命令创建消费者,并指定bootstrap-server和topic。\[1\]\[2\]\[3\]
#### 引用[.reference_title]
- *1* *2* [笔记系列之docker安装Kafka与spring boot + kafka 示例](https://blog.csdn.net/Apple_wolf/article/details/119977346)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [spring boot + kafka 简单配置](https://blog.csdn.net/Amy126/article/details/126008395)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文