Dav*_*sio 12 apache-kafka debezium
我是 kafka 的新手,我正在尝试使用 debezium postgres 连接器。但即使使用带有标准插件的 postgres 11 版,我也会收到此错误:org.apache.kafka.connect.errors.ConnectException: org.postgresql.util.PSQLException: ERROR: could not access file "decoderbufs": No such file or directory
要运行 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
Run Code Online (Sandbox Code Playgroud)
运行后我可以打开我的 localhost: 3030 来选择 debezium 连接器,我这样配置它:
我在 11.5 版中使用 aws postgres rds 我看到了几个使用 wal2json 的教程,但我没有在 rds.extensions 中找到它,也没有看到添加它的方法。无论如何,从版本 10 开始,debezium 可以使用 pgoutput 并且显然不需要配置。
执行 SHOW wal_level 时将 rds.logical_replication 属性设置为 1;在终端中,我看到它在文档中返回逻辑说您必须设置 max_wal_senders = 1 和 max_replication_slots = 1 放入 rds 中,最小值is 5, so I left the default that为 10
我没有定义角色 REPLICATION 因为根据我在 rds 中的理解,没有办法
在这张图片中你可以看到使用的版本是 11.5
但我收到错误,如下所示
Tec*_*Sid 17
您尚未在您已经弄清楚的Debezium连接器属性中将“plugin.name”属性设置为“pgoutput”。但是这个答案是为那些不知道在哪里设置这个选项的人准备的,为了更清楚。
在以下连接器属性中:
由于您尚未设置plugin.name选项,它采用默认值,即decoderbufs,这就是您收到以下错误的原因:
将“plugin.name”显式设置为“pgoutput”应该可以解决问题。
{
"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
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2536 次 |
| 最近记录: |