問題描述
是否有任何最佳實踐可用于將新表列入 debezium mysql 連接器的白名單?
Are there any best practices that are followed for whitelisting a new table to the debezium mysql connector ?
我們正在為 CDC 流使用 debezium mysql 連接器,并且出現了一個用例,將更多表列入連接器配置的白名單.這是正在使用的 debezium 的版本詳細信息和
We are using debezium mysql connector for our CDC flows and a use case has arised to whitelist more tables to the connector configuration. Here are the version details of the debezium being used and the
{
"class": "io.debezium.connector.mysql.MySqlConnector",
"version": "0.8.0.Final",
"snapshot.mode": "schema_only"
}
有一張 debezium 票 https://issues.redhat.com/browse/DBZ-906 表示在
There is a debezium ticket https://issues.redhat.com/browse/DBZ-906 which indicates to run the connector in
"snapshot.mode": "schema_only_recover"
mode 并在重新啟動連接器之前重新創建歷史主題.我有幾個關于這種方法的問題
mode and to recreate the history topic before restarting the connector. I had a couple of questions regarding this approach
推薦答案
首先,請升級 Debezium,因為 0.8.0 版本太舊了.
first of all, pleas eupgrade Debezium as version 0.8.0 is very old.
通常有多種方法可以解決您的問題,但如果您能負擔得起流式傳輸的暫停時間,那么我建議您這樣做1) 停止當前連接器2) 使用列入白名單的新表啟動新連接器以在其上執行快照3) 快照完成后,使用更新后的白名單列表啟動原始連接器
Generally there are multiple approaches to solving your issue but if you can afford a pause in streaming than I'd recommend to 1) Stop the current connector 2) Start a new connector with whitelisted new table to execute the snapshot on it 3) When snapshot is completed then start the original connector with updated whitelist table list
參見例如 https://groups.google.com/forum/?fromgroups=#!msg/debezium/Iw4BgLZ8Mq4/SZBLGwEaAQAJ;context-place=forum/debezium 了解詳細信息
See for example https://groups.google.com/forum/?fromgroups=#!msg/debezium/Iw4BgLZ8Mq4/SZBLGwEaAQAJ;context-place=forum/debezium for exact details
如果您無法承受停機時間,請查看 DBZ-175 中介紹的實驗方法一個>
If you cannot afford the downtime then please check the experimental approach introduced in DBZ-175
這篇關于在 Debezium Mysql Connector 中將更多表列入白名單的有效方法的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!