|
| 1 | +# drainer Configuration. |
| 2 | + |
| 3 | + # addr (i.e. 'host:port') to listen on for drainer connections |
| 4 | +# will register this addr into etcd |
| 5 | +# addr = "127.0.0.1:8249" |
| 6 | + |
| 7 | + # the interval time (in seconds) of detect pumps' status |
| 8 | +detect-interval = 10 |
| 9 | + |
| 10 | + # drainer meta data directory path |
| 11 | +data-dir = "data.drainer" |
| 12 | + |
| 13 | + # a comma separated list of PD endpoints |
| 14 | +pd-urls = "http://127.0.0.1:2379" |
| 15 | + |
| 16 | + # Use the specified compressor to compress payload between pump and drainer |
| 17 | +compressor = "" |
| 18 | + |
| 19 | + #[security] |
| 20 | +# Path of file that contains list of trusted SSL CAs for connection with cluster components. |
| 21 | +# ssl-ca = "/path/to/ca.pem" |
| 22 | +# Path of file that contains X509 certificate in PEM format for connection with cluster components. |
| 23 | +# ssl-cert = "/path/to/pump.pem" |
| 24 | +# Path of file that contains X509 key in PEM format for connection with cluster components. |
| 25 | +# ssl-key = "/path/to/pump-key.pem" |
| 26 | + |
| 27 | + # syncer Configuration. |
| 28 | +[syncer] |
| 29 | + |
| 30 | + # Assume the upstream sql-mode. |
| 31 | +# If this is setted , will use the same sql-mode to parse DDL statment, and set the same sql-mode at downstream when db-type is mysql. |
| 32 | +# If this is not setted, it will not set any sql-mode. |
| 33 | +# sql-mode = "STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION" |
| 34 | + |
| 35 | + # number of binlog events in a transaction batch |
| 36 | +txn-batch = 20 |
| 37 | + |
| 38 | + # work count to execute binlogs |
| 39 | +# if the latency between drainer and downstream(mysql or tidb) are too high, you might want to increase this |
| 40 | +# to get higher throughput by higher concurrent write to the downstream |
| 41 | +worker-count = 16 |
| 42 | + |
| 43 | +#disable-dispatch = false |
| 44 | + |
| 45 | + # safe mode will split update to delete and insert |
| 46 | +safe-mode = false |
| 47 | + |
| 48 | + # downstream storage, equal to --dest-db-type |
| 49 | +# valid values are "mysql", "file", "tidb", "flash", "kafka" |
| 50 | +db-type = "kafka" |
| 51 | + |
| 52 | + # disable sync these schema |
| 53 | +ignore-schemas = "INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql" |
| 54 | + |
| 55 | + ##replicate-do-db priority over replicate-do-table if have same db name |
| 56 | +##and we support regex expression , start with '~' declare use regex expression. |
| 57 | +# |
| 58 | +#replicate-do-db = ["~^b.*","s1"] |
| 59 | + |
| 60 | + #[[syncer.replicate-do-table]] |
| 61 | +#db-name ="test" |
| 62 | +#tbl-name = "log" |
| 63 | + |
| 64 | + #[[syncer.replicate-do-table]] |
| 65 | +#db-name ="test" |
| 66 | +#tbl-name = "~^a.*" |
| 67 | + |
| 68 | + # disable sync these table |
| 69 | +#[[syncer.ignore-table]] |
| 70 | +#db-name = "test" |
| 71 | +#tbl-name = "log" |
| 72 | + |
| 73 | + # the downstream mysql protocol database |
| 74 | +#[syncer.to] |
| 75 | +#host = "127.0.0.1" |
| 76 | +#user = "root" |
| 77 | +#password = "" |
| 78 | +#port = 3306 |
| 79 | + |
| 80 | + [syncer.to.checkpoint] |
| 81 | +# you can uncomment this to change the database to save checkpoint when the downstream is mysql or tidb |
| 82 | +#schema = "tidb_binlog" |
| 83 | + |
| 84 | + # Uncomment this if you want to use file as db-type. |
| 85 | +#[syncer.to] |
| 86 | +# directory to save binlog file, default same as data-dir(save checkpoint file) if this is not configured. |
| 87 | +# dir = "data.drainer" |
| 88 | + |
| 89 | + |
| 90 | + # when db-type is kafka, you can uncomment this to config the down stream kafka, it will be the globle config kafka default |
| 91 | +[syncer.to] |
| 92 | +# only need config one of zookeeper-addrs and kafka-addrs, will get kafka address if zookeeper-addrs is configed. |
| 93 | +# zookeeper-addrs = "127.0.0.1:2181" |
| 94 | + kafka-addrs = "kafka:9092" |
| 95 | + kafka-version = "5.1.0" |
| 96 | + kafka-max-messages = 1024 |
| 97 | +# |
| 98 | +# |
| 99 | +# the topic name drainer will push msg, the default name is <cluster-id>_obinlog |
| 100 | +# be careful don't use the same name if run multi drainer instances |
| 101 | +topic-name = "obinlog" |
0 commit comments