#异常信息:
Caused by: org.apache.kafka.common.errors.TimeoutException: Topic xxx_topic_add not present in metadata after 60000 ms
#解决方案:
手动创建 xxx_topic_add topic 指定2个分区,2个副本
[root@aiwwat31 kafka_2.12-2.4.1]# bin/kafka-topics.sh --create --zookeeper localhost:2181 --partitions 2 --replication-factor 2 --topic xxx_topic_add
Created topic xxx_topic_add.(创建成功)
#查看相关信息:
1,查询所有topic列表:
[root@aiwwat31 kafka_2.12-2.4.1]# bin/kafka-topics.sh --list --zookeeper localhost:2181
2,查询指定topic详细信息:
[root@aiwwat31 kafka_2.12-2.4.1]# bin/kafka-topics.sh --describe --zookeeper localhost:2181 --topic xxx_topic_add