Debezium PostgreSQL连接器未创建主题



当我使用启动PostgreSQL的Debezium连接器时,不会创建Kafka主题。以下是我在属性文件中的内容:

name=testdb
connector.class=io.debezium.connector.postgresql.PostgresConnector
topic.prefix=test
database.hostname=localhost
database.port=5432
database.user=postgres
database.password=root
database.dbname=testdb
database.server.name=testdb
table.include.list=ipaddrs
plugin.name=pgoutput

根据这一点,主题应该命名为testdb.myschema.ipaddrs(myschema是我的模式的名称(。然而,bin/kafka-topics.sh --list --bootstrap-server 192.168.56.1:9092什么也不返回。如果在表ipaddrs中添加一行,则不会创建主题。

当我运行bin/connect-standalone.sh config/connect-standalone.properties config/postgres.properties时,Kakfka连接成功启动,没有任何异常。

我有auto.create.topics.enable = truehttp://localhost:8083/connectors/testdb/status显示:

{"name":"testdb","connector":{"state":"RUNNING","worker_id":"10.0.0.48:8083"},"tasks":[{"id":0,"state":"RUNNING","worker_id":"10.0.0.48:8083"}],"type":"source"}

我不是动物园管理员。我正在和克拉夫特一起经营卡夫卡。

table.include.list不正确。它必须包括模式。所以在我的例子中应该是myschema.ipaddrs。此外,文档中的主题名称似乎不正确。在我的系统中,它是<topic.prefix>.<table name>。在我的例子中,它是test.myschema.ipaddrs

假设数据库具有正确的配置以使用Debezium postgreSQL连接器,则可以删除"database.dbname";如果ipaddrs是在另一个架构中不重复的表名。

最新更新