【发布时间】:2020-05-14 08:33:04
【问题描述】:
我有一个 Avro 序列化值的 Kafka 主题。
我正在尝试设置 JDBC(postgres) 接收器连接器以将这些消息转储到 postgres 表中。
但是,我遇到了错误。
"org.apache.kafka.common.config.ConfigException: Invalid value io.confluent.connect.avro.AvroConverter for configuration value.converter: Class io.confluent.connect.avro.AvroConverter could not be found."
我的 Sink.json 是
{"name": "postgres-sink",
"config": {
"connector.class":"io.confluent.connect.jdbc.JdbcSinkConnector",
"tasks.max":"1",
"topics": "<topic_name>",
"key.converter": "org.apache.kafka.connect.storage.StringConverter",
"value.converter": "io.confluent.connect.avro.AvroConverter",
"value.converter.schema.registry.url": "instaclustr_schema_registry_host:8085",
"connection.url": "jdbc:postgresql://postgres:5432/postgres?currentSchema=local",
"connection.user": "postgres",
"connection.password": "postgres",
"auto.create": "true",
"auto.evolve":"true",
"pk.mode":"none",
"table.name.format": "<table_name>"
}
}
另外,我在 connect-distributed.properties(引导服务器)中进行了更改。
我正在运行的命令是 -
curl -X POST -H "Content-Type: application/json" --data @postgres-sink.json https://<instaclustr_schema_registry_host>:8083/connectors
【问题讨论】:
标签: postgresql apache-kafka avro apache-kafka-connect