MYSQL CDC Endpoint
MYSQL CDC Endpoint v0.28.0+ Real-time capture and distribution of changes in the MYSQL database. Listen for database insert/update/delete events, and route them to rule chains for processing based on database.table name. .
TIP
- This component is an extension component and requires the introduction of additional extension libraries: rulego-components-etl (opens new window)
# Type
endpoint/mysql_cdc
# Startup Configuration
| Field | Type | Description | Default |
|---|---|---|---|
| server | string | MySQL server address | None |
| user | string | Username | None |
| password | string | Password | None |
| fromOldest | bool | Whether to synchronize from the oldest binlog, otherwise synchronize from the latest binlog and position | None |
| dbs | []string | Databases | None |
| includeTables | []string | Defines the tables to be included, if empty, all tables are included. For example: test.users. Also supports regular expressions: for example, [".\.canal","test."] | Empty array |
| excludeTables | []string | Defines the tables to be excluded from includeTables. For example: mysql.users. Also supports regular expressions: for example, "mysql\..*" | Empty array |
| executionPath | string | The execution path of mysqldump, such as mysqldump or /usr/bin/mysqldump, etc... | None |
| charset | string | Character set, for example: utf8 | None |
| flavor | string | mysql or mariadb | None |
| heartbeat | int | Heartbeat in seconds | None |
| readTimeout | int | Read timeout in seconds | None |
# Routing Parameters
Route to the corresponding rule chain based on the triggered database name.table name. Regular expressions are supported. * represents matching all tables.
# Output Parameters
The RuleMsg data input to the rule chain is formatted as follows:
- metadata
| Field | Type | Description |
|---|---|---|
| tableFullName | string | The triggered database.table name |
| tableName | string | The triggered table name |
| tableSchema | string | The triggered database name |
| action | string | The triggered action insert/update/delete |
| columnNames | []string | List of column names |
| pkColumnNames | []string | List of primary key column names |
data Format: []Row, where Row is []interface{} (values of each column). If it is an update, the format is: [Row before update, Row after update]
msgType
- insert: Insert event
- update: Update event
- delete: Delete event
- dataType JSON
Edit this page on GitHub (opens new window)
Last Updated: 2025/09/03, 10:09:04