连接器配置(debezium-mysql.json):
```
{
"name": "debezium-mysql-src",
"config": {
"connector.class": "io.debezium.connector.mysql.MySqlConnector",
"tasks.max": "1",
"database.hostname": "mysql",
"database.port": "3306",
"database.user": "replicator",
"database.password": "secret",
"database.allowPublicKeyRetrieval": "true",
"topic.prefix": "app",
"database.include.list": "app",
"table.include.list": "app.users,app.orders",
"include.schema.changes": "true",
"snapshot.mode": "initial",
"decimal.handling.mode": "precise"
}
}
```
通过 REST 创建并查看状态:
```
curl -X POST -H "Content-Type: application/json" --data @debezium-mysql.json http://localhost:8083/connectors
curl http://localhost:8083/connectors/debezium-mysql-src/status
```

发表评论 取消回复