github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/pkg/cmd/util/changefeed.toml (about) 1 # 指定配置文件中涉及的库名、表名是否为大小写敏感的 2 # 该配置会同时影响 filter 和 sink 相关配置,默认为 true 3 4 # Specify whether the schema name and table name in this configuration file are case sensitive 5 # This configuration will affect both filter and sink related configurations, the default is true 6 case-sensitive = true 7 8 [filter] 9 # 忽略哪些 StartTs 的事务 10 # Transactions with the following StartTs will be ignored 11 ignore-txn-start-ts = [1, 2] 12 13 # 过滤器规则 14 # 过滤规则语法:https://docs.pingcap.com/zh/tidb/stable/table-filter#%E8%A1%A8%E5%BA%93%E8%BF%87%E6%BB%A4%E8%AF%AD%E6%B3%95 15 # The rules of the filter 16 # Filter rules syntax: https://docs.pingcap.com/tidb/stable/table-filter#syntax 17 rules = ['*.*', '!test.*'] 18 19 [mounter] 20 # mounter 线程数 21 # the thread number of the the mounter 22 worker-num = 16 23 24 [sink] 25 # 对于 MQ 类的 Sink,可以通过 dispatchers 配置 event 分发器 26 # 分发器支持 default, ts, rowid, table 四种 27 # For MQ Sinks, you can configure event distribution rules through dispatchers 28 # Dispatchers support default, ts, rowid and table 29 dispatchers = [ 30 { matcher = ['test1.*', 'test2.*'], partition = "ts", topic = "hello_{schema}" }, 31 { matcher = ['test3.*', 'test4.*'], dispatcher = "rowid", topic = "{schema}_world" }, 32 ] 33 # 对于 MQ 类的 Sink,可以通过 column-selectors 配置 column 选择器 34 # For MQ Sinks, you can configure column selector rules through column-selectors 35 column-selectors = [ 36 { matcher = ['test1.*', 'test2.*'], columns = ["column1", "column2"] }, 37 { matcher = ['test3.*', 'test4.*'], columns = ["!a", "column3"] }, 38 ] 39 # 对于 MQ 类的 Sink,可以指定消息的协议格式 40 # 协议目前支持 open-protocol, canal, canal-json, avro 和 maxwell 五种。 41 # For MQ Sinks, you can configure the protocol of the messages sending to MQ 42 # Currently the protocol support open-protocol, canal, canal-json, avro and maxwell. 43 protocol = "open-protocol" 44 45 [consistent] 46 # 一致性级别,none 为默认,非灾难场景,提供 finished-ts 情况下的最终一致性;eventual 使用 redo log,提供上游灾难情况下的最终一致性 47 # consistent level, none is the default value. 48 # none: eventual consistent support in non-disaster scenario(should provide a finished-ts) 49 # eventual: eventual consistent in disaster scenario 50 level = "none" 51 # 单个 redo log 文件大小,单位 MB 52 # file size of single redo log, unit is MB 53 max-log-size = 64 54 # 刷新或上传 redo log 至 S3 的间隔,单位毫秒 55 # interval to flush or upload redo log, default is 2000ms, unit is microseconds 56 flush-interval = 2000 57 # 存储 redo log 的形式,包括 nfs(NFS 目录),S3(上传至S3),blackhole(测试用) 58 # storage type for redo log 59 # nfs: store redo logs in nfs directly 60 # s3: upload redo logs to s3 storage 61 # blackhole: used for test only 62 storage = "s3://logbucket/test-changefeed?endpoint=http://$S3_ENDPOINT/"