我已经使用“ Postgresql”数据库设置了环境,并通过Kafka Connect和Kafka使用了“ Debezium”连接器。 Kafka有多个实例(3)正在运行,并且已使用Zookeeper(3)进行配置。整个管道中的连接都可以正常工作,但是根据Debezium的文档,没有根据主题表中的表自动创建主题数据库。例如,假设某个模式中的表A和表B,我假设这两个主题是在Kafka中隐式创建的。连接器和任务的状态为RUNNING,下面提到的是我对连接器所做的配置
{
"name": "geo-connector",
"config": {
"connector.class": "io.debezium.connector.postgresql.PostgresConnector",
"tasks.max": "1",
"database.hostname": <dbHostName>,
"database.port": <dbPort>,
"database.user": <dbUser>,
"database.password":<dbPassword> ,
"database.dbname" : <dbName>,
"database.server.name": <logicalName>,
"database.history.kafka.bootstrap.servers":<>,
"database.history.kafka.topic": "schema-changes.inventory",
"plugin.name":"wal2json",
"config.storage.replication.factor": "3",
"offset.storage.replication.factor" : "3",
"auto.create.topics.enable" : "true",
"snapshot.mode" : "always"
}
}
我在“连接”日志中看到的错误为,
2018-08-09 15:28:50,409-调试[KafkaBasedLog工作线程-kconnect-offsets:Fetcher @ 199]-[消费者clientId = consumer-1,groupId = 1]发送READ_UNCOMMITTED IncrementalFetchRequest(toSend =(), toForget =(),隐含=(kconnect-offsets-10,kconnect-offsets-4,kconnect-offsets-16,kconnect-offsets-7,kconnect-offsets-19,kconnect-offsets-13,kconnect-offsets-22, kconnect-offsets-1))代理kafka-02.hotel02.pro06.eu.idealo.com:9092(编号:2002机架:pro06) 2018-08-09 15:28:50,465-调试[kafka-producer-network-thread | producer-6:NetworkClient $ DefaultMetadataUpdater @ 927]-[Producer clientId = producer-6]将元数据请求(类型= MetadataRequest,topic = dbserver1.public.spatial_ref_sys)发送到节点kafka-01.hotel02.pro05.eu.idealo.com :9092(id:2004机架:pro05) 2018-08-09 15:28:50,467-警告[kafka-producer-network-thread | producer-6:NetworkClient $ DefaultMetadataUpdater @ 882]-[Producer clientId = producer-6]提取关联ID为23856的元数据时出错:{dbserver1.public.spatial_ref_sys = UNKNOWN_TOPIC_OR_PARTITION} 2018-08-09 15:28:50,467-调试[kafka-producer-network-thread | producer-6:Metadata @ 270]-将群集元数据版本23852更新为Cluster(id = BwqlZApfT-ygzWr_wPcdng,nodes = [kafka-03.hotel02.pro05.eu.idealo.com:9092(id:2003 rack:pro05), kafka-01.hotel02.pro05.eu.idealo.com:9092(编号:2004机架:pro05),kafka-02.hotel02.pro06.eu.idealo.com:9092(标识:2002机架:pro06)],分区= [])
答案 0 :(得分:0)
您在日志中看到的消息是警告,不是错误。您可以尝试使用kafka-topics.sh
实用工具列出可用的主题吗?