conf/application.yml: server: port: 8081 spring: jackson: date-format: yyyy-MM-dd HH:mm:ss time-zone: GMT+8 default-property-inclusion: non_null
canal.conf: mode: tcp # kafka rocketMQ canalServerHost: 127.0.0.1:11111 batchSize: 500 syncBatchSize: 1000 retries: 0 timeout: accessKey: secretKey: srcDataSources: defaultDS: url: jdbc:mysql://xxxx:3306/test?useUnicode=true&characterEncoding=utf-8&connectionCollation=utf8mb4_general_ci username: canal password: xxxx canalAdapters:
- instance: example # canal instance Name or mq topic name
groups:
- groupId: g1
outerAdapters:
- name: rdb key: mysql1 properties: jdbc.driverClassName: com.mysql.jdbc.Driver jdbc.url: jdbc:mysql://xxxx:3306/test?useUnicode=true&characterEncoding=utf-8&connectionCollation=utf8mb4_general_ci jdbc.username: canal jdbc.password: xxxxx
- groupId: g1
outerAdapters:
mysql_test-1.yaml: ataSourceKey: defaultDS destination: example groupId: g1 outerAdapterKey: mysql1 concurrent: true dbMapping: database: test table: test1 targetTable: mljit.test1 targetPk: id: id mapAll: true commitBatch: 3000 # 批量提交的大小
mysql_test-2.yaml: ataSourceKey: defaultDS destination: example groupId: g1 outerAdapterKey: mysql1 concurrent: true dbMapping: database: test table: test2 targetTable: mljit.test2 targetPk: id: id mapAll: true commitBatch: 3000 # 批量提交的大小