我是 kafka 新手,我正在尝试使用 debezium postgres 连接器。
但即使使用带有标准插件的 postgres 版本 11,我也会收到此错误:
org.apache.kafka.connect.errors.ConnectException:org.postgresql.util.PSQLException:错误:无法访问文件“decoderbufs”:没有这样的文件或目录
为了运行 kafka / debezium,我使用 fast-data-dev docker 的镜像,如下所示
# this is our kafka cluster.
kafka-cluster:
image: landoop/fast-data-dev:latest
environment:
ADV_HOST: 127.0.0.1 # Change to 192.168.99.100 if using Docker Toolbox
RUNTESTS: 0 # Disable Running tests so the cluster starts faster
ports:
- 2181:2181 # Zookeeper
- 3030:3030 # Landoop UI
- 8081-8083:8081-8083 # REST Proxy, Schema Registry, Kafka Connect ports
- 9581-9585:9581-9585 # JMX Ports
- 9092:9092 # Kafka Broker
运行后我可以打开我的 localhost: 3030 来选择 debezium 连接器,我这样配置:
我在版本 11.5 中使用 aws postgres rds
我看到了几个使用wal2json的教程,但我没有在rds.extensions中找到它,也没有看到添加它的方法。无论如何,从版本 10 开始,debezium 可以使用 pgoutput 并且显然不需要配置。
rds.logic_replication 属性设置为 1
执行SHOW wal_level时;在终端中我看到它返回逻辑
文档中说您必须设置 max_wal_senders = 1 和 max_replication_slots = 1
放入 rds 最小值is 5, so I left the default that
is 10
我没有定义角色 REPLICATION 因为根据我在 rds 中的理解,没有办法
在此图中您可以看到使用的版本是 11.5
但我收到错误,如下所示
你还没有设置“插件名称”财产给“pg输出”在你的Debezium中连接器属性 https://debezium.io/documentation/reference/1.1/connectors/postgresql.html#postgresql-connector-properties你已经知道了。但这个答案是为那些不知道在哪里设置此选项的人提供的,并且为了更清楚。
在以下连接器属性中:
由于你还没有设置插件名称选项它采用默认值解码器缓冲区这就是您收到以下错误的原因:
设置“插件名称”明确地“pg输出”应该可以解决问题。
{
"connector.class": "io.debezium.connector.postgresql.PostgresConnector",
"database.user": "postgres",
"database.dbname": "xxxxx",
"tasks.max": "1",
"database.hostname": "xxxx.rds.amazonaws.com",
"database.password": "xxxx",
"database.server.name": "database-1",
"database.port": "5432",
"plugin.name": "pgoutput" --> this property
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)