Configuration
The configuration of Canal source connector has the following properties.Property
Example
Before using the Canal connector, you can create a configuration file through one of the following methods.-
JSON
-
YAML
You can create a YAML file and copy the contents below to your YAML file.
Usage
Here is an example of storing MySQL data using the configuration file as above.-
Start a MySQL server.
-
Create a configuration file
mysqld.cnf. -
Copy the configuration file
mysqld.cnfto MySQL server. -
Restart the MySQL server.
-
Create a test database in MySQL server.
-
Start a Canal server and connect to MySQL server.
-
Start Pulsar standalone.
-
Modify the configuration file
canal-mysql-source-config.yaml. -
Create a consumer file
pulsar-client.py. -
Copy the configuration file
canal-mysql-source-config.yamland the consumer filepulsar-client.pyto Pulsar server. -
Download a Canal connector and start it.
-
Consume data from MySQL.
-
Open another window to log in MySQL server.
-
Create a table, and insert, delete, and update data in MySQL server.