-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathapp-example.toml
101 lines (84 loc) · 1.99 KB
/
app-example.toml
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
debug = true
env = "dev"
[sourceDB]
host = "xxxxxxxxx"
port = 3306
username = "xxxxxx"
password = "xxxxxx"
charset = ""
# server id like a slave,同时还作为ID生成器,生成kafka消息的ID
serverID = 130
flavor = "mysql"
mysqldump = ""
# minimal items to be inserted in one bulk
bulkSize = 128
flushBulkTime = 200
skipNoPkTable = false
skipMasterData = false
#
[[sourceDB.sources]]
schema = "xxxxx"
tables = ["xxxxxx"]
#[[sourceDB.sources]]
#schema = "fonzie"
#tables = ["t", "t_[0-9]{4}", "tfield", "tfilter"]
#[[sourceDB.rule]]
#schema = "test"
#table = "t"
#index = "test"
#type = "t"
[http]
statAddr = "127.0.0.1:8000"
statPath = "/metrics"
[redis]
host = "127.0.0.1:6379"
password = "xxxxx"
db = 0
poolSize = 30
idleTimeout = 30
maxRetries = 5
dialTimeout = 10
# binlog在redis的TTL,目前没有用到这个功能
binlogTimeout = 900
binlogPrefix = "xxxxxxx"
# 分表分库做映射
[mapper]
schemas = ["xxxxxx"]
[kafka]
# kafka地址
brokers = ["xxxxxx:9092"]
# 设置kafka版本
version = "2.1.0"
# 跳过证书可信性检测
insecureSkipVerify = true
# 开启ssl访问
saslEnable = false
# 用户名
username = "xxxxx"
# 密码
password = "xxxxxx"
# ca证书
certFile = "ca-cert"
[kafka.producer]
# 等待服务器所有副本都保存成功后的响应, NoResponse: 0 WaitForLocal: 1 WaitForAll: -1,发送完数据需要leader和follow都确认
requiredAcks = 1
# 生产者投递影响消息在partitioner上的分布
# Manual: 只投递到partition 0,一般用于保序
# RoundRobin: rr轮训模式
# Random: 随机投递
# Hash: Hash投递
# ReferenceHash:
# 默认rr模式
PartitionerType = "default"
# 是否等待成功和失败后的响应,只有上面的RequireAcks设置不是NoReponse这里才有用.
returnSuccesses = true
returnErrors = true
# 消息投递失败重试次数
retryMax = 5
[[kafka.producer.headers]]
key = "xxxxxx"
value = "xxxxxx"
# 默认目标topic是表名,如果要重命名就可以在这里配置对应关系
[[kafka.producer.mapper]]
sourceTable = "xxx"
topic = "xxxx"