可选值
| 取值 | 行为 |
|---|---|
| initial | 先做全量快照,再无缝跟踪增量(默认) |
| earliest-offset | 从当前可用的最早位点开始回放(不做快照) |
| latest-offset | 从当前最新位点开始,只消费之后的新变更 |
| specific-offset | 从指定的 file/pos 或 GTID 开始(需附位点参数) |
| timestamp | 从指定时间点对应的位点开始 |
SQL 中显式指定
SQL 中显式指定
'scan.startup.mode' = 'latest-offset'earliest-offset 能追回多少历史取决于 binlog 保留期;保留期之外的数据同样拿不到。