TICDC同步数据到kafka原创
# TICDC同步数据到kafka
配置文件
tidb2kafka.toml
case-sensitive = true
enable-old-value = true
[filter]
ignore-txn-start-ts = [1, 2]
rules = [
'my_test_schema.my_test_table01',
'my_test_schema.my_test_table02',
'my_test_schema.my_test_table03',
'my_test_schema.my_test_table04']
[mounter]
worker-num = 4
[[sink.dispatchers]]
matcher = [
'my_test_schema.my_test_table01',
'my_test_schema.my_test_table02',
'my_test_schema.my_test_table03',
'my_test_schema.my_test_table04']
dispatcher = 'ts'
[sink]
protocol = "canal-json"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
创建任务
cdc cli changefeed create --pd=http://10.10.10.105:2379 --sink-uri="kafka://10.10.10.231:9092/my_test_topic?protocol=canal-json&kafka-version=2.6.0&partition-num=10&max-message-bytes=67108864&replication-factor=3" --changefeed-id="my_test-to-kafka-dev" --config="tidb2kafka.toml" --start-ts="0"
1
暂停任务
cdc cli changefeed pause --pd=http://10.10.10.105:2379 --changefeed-id="my_test-to-kafka-dev"
1
查询任务
cdc cli changefeed query -s --pd=http://10.10.10.105:2379 --changefeed-id="my_test-to-kafka-dev"
1
删除任务
cdc cli changefeed remove -s --pd=http://10.10.10.105:2379 --changefeed-id="my_test-to-kafka-dev"
1
更新任务
cdc cli changefeed update--pd=http://10.10.10.105:2379 --sink-uri="kafka://10.10.10.231:9092/my_test_db_sync?protocol=canal-json&kafka-version=2.6.0&partition-num=10&max-message-bytes=67108864&replication-factor=3" --changefeed-id="dev-my_test-to-kafka" --config="tidb2kafka.toml"
1
继续任务
cdc cli changefeed resume -s --pd=http://10.10.10.105:2379 --changefeed-id="my_test-to-kafka-dev"
1
查看进程
cdc cli processor list --pd=http://10.10.10.105:2379 --changefeed-id="my_test-to-kafka-dev"
1
上次更新: 9/14/2024
← 安装配置 对tidb中算子的理解→
- 01
- MongoDB 集群Config Server 复制集的工作原理09-14
- 02
- MongoDB 集群架构介绍09-14