You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/connectors/mysql-cdc.md
+30-5Lines changed: 30 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -218,10 +218,30 @@ Connector Options
218
218
<td>optional</td>
219
219
<td style="word-wrap: break-word;">initial</td>
220
220
<td>String</td>
221
-
<td>Optional startup mode for MySQL CDC consumer, valid enumerations are "initial"
222
-
and "latest-offset".
223
-
Please see <a href="#startup-reading-position">Startup Reading Position</a>section for more detailed information.</td>
224
-
</tr>
221
+
<td>Optional startup mode for MySQL CDC consumer, valid enumerations are "initial","earliest-offset", "latest-offset", "specific-offset" and "timestamp".
222
+
Please see <a href="#startup-reading-position">Startup Reading Position</a> section for more detailed information.</td>
223
+
</tr>
224
+
<tr>
225
+
<td>scan.startup.specific-offset.file</td>
226
+
<td>optional</td>
227
+
<td style="word-wrap: break-word;">(none)</td>
228
+
<td>String</td>
229
+
<td>Optional binlog file name used in case of "specific-offset" startup mode</td>
230
+
</tr>
231
+
<tr>
232
+
<td>scan.startup.specific-offset.pos</td>
233
+
<td>optional</td>
234
+
<td style="word-wrap: break-word;">(none)</td>
235
+
<td>Long</td>
236
+
<td>Optional GTID set used in case of "specific-offset" startup mode</td>
237
+
</tr>
238
+
<tr>
239
+
<td>scan.startup.specific-offset.gtid-set</td>
240
+
<td>optional</td>
241
+
<td style="word-wrap: break-word;">(none)</td>
242
+
<td>Long</td>
243
+
<td>Optional binlog file position used in case of "specific-offset" startup mode</td>
244
+
</tr>
225
245
<tr>
226
246
<td>server-time-zone</td>
227
247
<td>optional</td>
@@ -527,10 +547,15 @@ both snapshot phase and binlog phase, MySQL CDC connector read with **exactly-on
527
547
The config option `scan.startup.mode` specifies the startup mode for MySQL CDC consumer. The valid enumerations are:
528
548
529
549
-`initial` (default): Performs an initial snapshot on the monitored database tables upon first startup, and continue to read the latest binlog.
550
+
-`earliest-offset`: Skip snapshot phase and start reading binlog events from the earliest accessible binlog offset.
530
551
-`latest-offset`: Never to perform snapshot on the monitored database tables upon first startup, just read from
531
552
the end of the binlog which means only have the changes since the connector was started.
553
+
-`specific-offset`: Skip snapshot phase and start reading binlog events from a specific offset. The offset could be
554
+
specified with binlog filename and position, or a GTID set if GTID is enabled on server.
555
+
-`timestamp`: Skip snapshot phase and start reading binlog events from a specific timestamp.
532
556
533
-
_Note: the mechanism of `scan.startup.mode` option relying on Debezium's `snapshot.mode` configuration. So please do not using them together. If you speicifying both `scan.startup.mode` and `debezium.snapshot.mode` options in the table DDL, it may make `scan.startup.mode` doesn't work._
557
+
**Note:** MySQL source will print the current binlog position into logs with INFO level on checkpoint, with the prefix
558
+
"Binlog offset on checkpoint {checkpoint-id}". It could be useful if you want to restart the job from a specific checkpointed position.
0 commit comments