在创建主题时,

在较新版本(2.2 及更高版本)的 Kafka 不再需要 ZooKeeper 连接字符串,即- -zookeeper localhost:2181。使用 Kafka Broker的 --bootstrap-server localhost:9092来替代- -zookeeper localhost:2181。

即使用命令:

bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test

替代命令:

bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test

 

相关文章:

  • 2021-06-10
  • 2021-09-18
  • 2022-12-23
  • 2021-06-01
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
猜你喜欢
  • 2022-01-08
  • 2022-12-23
  • 2021-04-07
  • 2021-10-27
  • 2021-11-24
  • 2022-12-23
  • 2022-02-24
相关资源
相似解决方案