【发布时间】:2021-01-17 04:48:47
【问题描述】:
我配置了一个 Kafka JDBC 源连接器,以便将来自 PostgreSQL 数据库的记录更改(插入或更新)推送到 Kafka 主题。 我使用“时间戳+递增”模式。似乎工作正常。 我没有配置 JDBC Sink 连接器,因为我使用的是监听该主题的 Kafka Consumer。
关于该主题的消息是 JSON。这是一个例子:
{
"schema": {
"type": "struct",
"fields": [
{
"type": "int64",
"optional": false,
"field": "id"
},
{
"type": "int64",
"optional": true,
"name": "org.apache.kafka.connect.data.Timestamp",
"version": 1,
"field": "entity_create_date"
},
{
"type": "int64",
"optional": true,
"name": "org.apache.kafka.connect.data.Timestamp",
"version": 1,
"field": "entity_modify_date"
},
{
"type": "int32",
"optional": true,
"field": "entity_version"
},
{
"type": "string",
"optional": true,
"field": "firstname"
},
{
"type": "string",
"optional": true,
"field": "lastname"
}
],
"optional": false,
"name": "author"
},
"payload": {
"id": 1,
"entity_create_date": 1600287236682,
"entity_modify_date": 1600287236682,
"entity_version": 1,
"firstname": "George",
"lastname": "Orwell"
}
}
如您所见,没有关于源连接器是否由于插入或更新而捕获此更改的信息。 我需要这些信息。怎么解决?
【问题讨论】:
标签: apache-kafka apache-kafka-connect