The configuration file of OceanBase Change Data Capture (obcdc) consists of required and optional parameters in the format of key-value pairs.
Note
For more information about obcdc parameters, see obcdc parameters.
The cluster_user and cluster_password parameters in the configuration file are required. They are used to specify the username and password of the sys tenant. Configure at least one of the cluster_url and rootserver_list parameters to specify the server information of RootService in OceanBase Database. If you configure both parameters, rootserver_list takes precedence. We recommend that you also configure some optional parameters. The following example shows the content of a sample configuration file named liboncdc.conf:
######### [cluster_info] #########
cluster_db_name=oceanbase
cluster_password=********
cluster_user=test
cluster_url=
# rootserver_list=
######### [working_mode] #########
meta_data_refresh_mode=data_dict
######### [synchronous information] #########
tb_white_list=*.*.*
tb_black_list=|
######### [module] #########
formatter_thread_num=20
######### [log] #########
log_level=ALL.*:INFO;PALF.*:WARN;SHARE.SCHEMA:WARN;TLOG.FETCHER:INFO;TLOG.FORMATTER:INFO;
enable_output_trans_order_by_sql_operation=1
Use a configuration file
If you connect obcdc to your data consumption link, specify the configuration file in the code. For more information, see obcdc development instructions.
If you use obcdc through obcdc_tailf, specify the configuration file when running the obcdc_tailf command. Here is an example:
[admin@test oceanbase]$ ./bin/obcdc_tailf -f libobcdc.conf -D output.txt
In the preceding example, libobcdc.conf is the relative path of the configuration file, and output.txt is the file where output data is saved. Replace the configuration file and the output data file as needed. For more information, see obcdc_tailf.