{"id":3087,"date":"2023-08-31T09:34:24","date_gmt":"2023-08-31T01:34:24","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=3087"},"modified":"2023-08-31T09:34:25","modified_gmt":"2023-08-31T01:34:25","slug":"%e4%b8%8d%e6%83%b3%e5%bc%95%e5%85%a5mq%ef%bc%9f%e4%b8%8d%e5%a6%a8%e8%af%95%e8%af%95-debezium","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/%e4%b8%8d%e6%83%b3%e5%bc%95%e5%85%a5mq%ef%bc%9f%e4%b8%8d%e5%a6%a8%e8%af%95%e8%af%95-debezium\/","title":{"rendered":"\u4e0d\u60f3\u5f15\u5165MQ\uff1f\u4e0d\u59a8\u8bd5\u8bd5 Debezium"},"content":{"rendered":"<p style=\"outline: 0px; letter-spacing: 0.544px; white-space: normal; visibility: visible;\"><span style=\"outline: 0px; color: #888888; font-size: 14px; letter-spacing: 0.544px; visibility: visible; font-family: 'Helvetica Neue', Helvetica, 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;\">\u539f\u6587\uff1a<\/span><span style=\"outline: 0px; color: #888888; letter-spacing: 0.544px; visibility: visible; font-family: 'Helvetica Neue', Helvetica, 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif; font-size: 12px;\">juejin.cn\/post\/7264791359839223823<\/span><\/p>\n<p style=\"outline: 0px; letter-spacing: 0.544px; white-space: normal; visibility: visible;\"><span style=\"outline: 0px; color: #888888; letter-spacing: 0.544px; visibility: visible; font-family: 'Helvetica Neue', Helvetica, 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif; font-size: 12px;\">\u00a0<\/span><\/p>\n<section data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u5965\u5361\u59c6\u5243\u5200\u539f\u7406\uff0c\u201c\u5982\u65e0\u5fc5\u8981\uff0c\u52ff\u589e\u5b9e\u4f53\"\u3002 \u5728\u4e00\u4e9b\u5c0f\u578b\u9879\u76ee\u5f53\u4e2d\uff0c\u6ca1\u6709\u5f15\u5165\u6d88\u606f\u4e2d\u95f4\u4ef6\uff0c\u4e5f\u4e0d\u60f3\u5f15\u5165\uff0c\u4f46\u6709\u4e00\u4e9b\u4e1a\u52a1\u903b\u8f91\u60f3\u8981\u89e3\u8026\u5f02\u6b65\uff0c\u90a3\u600e\u4e48\u529e\u5462\uff1f<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u6211\u4eec\u7684web\u9879\u76ee\uff0c\u5355\u72ec\u5185\u7f51\u90e8\u7f72\uff0c\u7531\u4e8e\u5927\u6570\u636e\u80cc\u666f\uff0c\u516c\u53f8\u6d88\u606f\u4e2d\u95f4\u4ef6\u7edf\u4e00\u4f7f\u7528\u7684kafka\uff0c\u5728\u4e00\u4e9b\u5c0f\u9879\u76ee\u4e0akafka\u5c31\u663e\u5f97\u5f88\u7b28\u91cd\u3002 \u5f15\u5165rocketmq\u6216rabittmq\u4e5f\u6ca1\u5fc5\u8981\u3002 \u4e8b\u4ef6\u6216\u591a\u7ebf\u7a0b\u4e5f\u4e0d\u9002\u5408\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u5177\u4f53\u4e00\u70b9\u7684\uff0c\u4e4b\u524d\u5bf9\u63a5\u7684\u4e00\u4e2a\u7cfb\u7edf\uff0c\u4e00\u5f20\u8bb0\u5f55\u8868\u670910+\u4ee5\u4e0a\u7684\u7c7b\u578b\u72b6\u6001\uff0c\u65b0\u7684\u9700\u6c42\u662f\uff0c\u9488\u5bf9\u6bcf\u79cd\u72b6\u6001\u505a\u51fa\u5bf9\u5e94\u7684\u4e0d\u540c\u7684\u64cd\u4f5c\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u4e4b\u524d\u5199\u5165\u8fd9\u5f20\u8bb0\u5f55\u8868\u7684\u65f6\u5019\uff0c\u65b9\u5f0f\u4e5f\u662f\u4e94\u82b1\u516b\u95e8\uff0c\u6709\u7684\u662f\u5355\u6761\u8bb0\u5f55\u5199\u5165\uff0c\u6709\u7684\u662f\u6279\u91cf\u5199\u5165\uff0c\u6709\u7684\u8c03\u7528\u4e86\u7edf\u4e00\u7684service,\u6709\u7684\u5462\u76f4\u63a5\u8c03\u7528\u4e86DAO\u5c42mapper\u76f4\u63a5\u5199\u5165\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u6240\u4ee5\u60f3\u627e\u5230\u4e00\u4e2a\u7edf\u4e00\u5165\u53e3\u8fdb\u884c\u5207\u5165\u5904\u7406\uff0c\u5c31\u4e0d\u884c\u4e86\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u8fd9\u4e2a\u65f6\u5019\u5c31\u7b97\u5f15\u5165\u6d88\u606f\u961f\u5217\uff0c\u4e5f\u9700\u8981\u5728\u4e0d\u540c\u7684\u4e1a\u52a1\u65b9\u6cd5\u91cc\u8fdb\u884c\u5199\u5165\u6d88\u606f\u7684\u64cd\u4f5c\u3002\u4e1a\u52a1\u65b9\u4e5f\u4e0d\u592a\u613f\u610f\u914d\u5408\u6539\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u53ef\u4ee5\u4f7f\u7528\u89e6\u53d1\u5668\uff0c\u4f46\u5b83\u662f\u5c5e\u4e8e\u4e0a\u4e2a\u65f6\u4ee3\u7684\u4ea7\u7269\uff0c\u69fd\u70b9\u592a\u591a\u3002\uff08\u8fd9\u91cc\u5e76\u4e0d\u662f\u5b8c\u5168\u4e0d\u4e3b\u5f20\u4f7f\u7528\u89e6\u53d1\u5668\uff0c\u6280\u672f\u6c38\u8fdc\u662f\u4e3a\u4e1a\u52a1\u670d\u52a1\u7684\uff0c\u53ea\u8981\u8bc4\u4f30\u89c9\u5f97\u53ef\u884c\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528\uff09<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u90a3\u4e48\u8fd9\u4e2a\u65f6\u5019\uff0cCDC\u6280\u672f\u5c31\u53ef\u4ee5\u7c89\u58a8\u767b\u573a\u4e86\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">CDC(change data capture)\u6570\u636e\u66f4\u6539\u6355\u83b7\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u5e38\u89c1\u7684\u6570\u636e\u66f4\u6539\u6355\u83b7\u90fd\u662f\u901a\u8fc7\u6570\u636e\u5e93\u6bd4\u5982mysql\u7684binlog\u6765\u8fbe\u5230\u76ee\u7684\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u6211\u4eec\u53ef\u4ee5\u76d1\u63a7mysql binlog\u65e5\u5fd7\uff0c\u5f53\u5199\u5165\u4e00\u6761\u6570\u636e\u7684\u65f6\u5019\uff0c\u63a5\u6536\u5230\u6570\u636e\u53d8\u66f4\u65e5\u5fd7\uff0c\u505a\u51fa\u76f8\u5e94\u7684\u64cd\u4f5c\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u8fd9\u6837\u7684\u597d\u5904\u662f\uff0c\u53ea\u9700\u5bfc\u5165\u4f9d\u8d56\uff0c\u4e0d\u989d\u5916\u5f15\u5165\u7ec4\u4ef6\uff0c\u540c\u65f6\u65e0\u9700\u6539\u52a8\u4e4b\u524d\u7684\u4ee3\u7801\u3002 \u4e24\u8fb9\u5b8c\u5168\u89e3\u8026\uff0c\u4e92\u4e0d\u5e72\u6270\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u5e38\u89c1\u7684CDC\u6846\u67b6\uff0c\u6bd4\u5982\uff0ccanal\uff08\u975eCamel\uff09<\/span><\/p>\n<ul class=\"list-paddingleft-1\" style=\"margin-top: 8px; margin-bottom: 8px; padding-left: 2em;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li style=\"color: #666666; font-size: 16px;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\"><span style=\"font-size: 16px;\">canal [k\u0259'n\u00e6l]\uff0c\u8bd1\u610f\u4e3a\u6c34\u9053\/\u7ba1\u9053\/\u6c9f\u6e20\uff0c\u4e3b\u8981\u7528\u9014\u662f\u57fa\u4e8e MySQL \u6570\u636e\u5e93\u589e\u91cf\u65e5\u5fd7\u89e3\u6790\uff0c\u63d0\u4f9b\u589e\u91cf\u6570\u636e\u8ba2\u9605\u548c\u6d88\u8d39 \u65e9\u671f\u963f\u91cc\u5df4\u5df4\u56e0\u4e3a\u676d\u5dde\u548c\u7f8e\u56fd\u53cc\u673a\u623f\u90e8\u7f72\uff0c\u5b58\u5728\u8de8\u673a\u623f\u540c\u6b65\u7684\u4e1a\u52a1\u9700\u6c42\uff0c\u5b9e\u73b0\u65b9\u5f0f\u4e3b\u8981\u662f\u57fa\u4e8e\u4e1a\u52a1 trigger \u83b7\u53d6\u589e\u91cf\u53d8\u66f4\u3002 \u4ece 2010 \u5e74\u5f00\u59cb\uff0c\u4e1a\u52a1\u9010\u6b65\u5c1d\u8bd5\u6570\u636e\u5e93\u65e5\u5fd7\u89e3\u6790\u83b7\u53d6\u589e\u91cf\u53d8\u66f4\u8fdb\u884c\u540c\u6b65\uff0c\u7531\u6b64\u884d\u751f\u51fa\u4e86\u5927\u91cf\u7684\u6570\u636e\u5e93\u589e\u91cf\u8ba2\u9605\u548c\u6d88\u8d39\u4e1a\u52a1\u3002<\/span><\/p>\n<\/section>\n<\/li>\n<li style=\"color: #666666; font-size: 16px;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\"><span style=\"font-size: 16px;\">\u5b83\u662f\u57fa\u4e8e\u65e5\u5fd7\u589e\u91cf\u8ba2\u9605\u548c\u6d88\u8d39\u7684\u4e1a\u52a1\uff0c\u5305\u62ec\uff1a<\/span><\/p>\n<\/section>\n<\/li>\n<\/ul>\n<blockquote style=\"border-top: none; border-right: none; border-bottom: none; font-size: 0.9em; overflow: auto; color: #6a737d; padding: 10px 10px 10px 20px; margin-bottom: 20px; margin-top: 20px; background: #f9f9f9; border-left-color: #5c9dff;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<p style=\"font-size: 16px; line-height: 26px; color: #999999; padding-top: 3px; padding-bottom: 3px;\">\u6570\u636e\u5e93\u955c\u50cf<\/p>\n<p style=\"font-size: 16px; line-height: 26px; color: #999999; padding-top: 3px; padding-bottom: 3px;\">\u6570\u636e\u5e93\u5b9e\u65f6\u5907\u4efd<\/p>\n<p style=\"font-size: 16px; line-height: 26px; color: #999999; padding-top: 3px; padding-bottom: 3px;\">\u7d22\u5f15\u6784\u5efa\u548c\u5b9e\u65f6\u7ef4\u62a4(\u62c6\u5206\u5f02\u6784\u7d22\u5f15\u3001\u5012\u6392\u7d22\u5f15\u7b49)<\/p>\n<p style=\"font-size: 16px; line-height: 26px; color: #999999; padding-top: 3px; padding-bottom: 3px;\">\u4e1a\u52a1 cache \u5237\u65b0<\/p>\n<p style=\"font-size: 16px; line-height: 26px; color: #999999; padding-top: 3px; padding-bottom: 3px;\">\u5e26\u4e1a\u52a1\u903b\u8f91\u7684\u589e\u91cf\u6570\u636e\u5904\u7406<\/p>\n<\/blockquote>\n<p><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.5268518518518519\" data-data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-51\/20230830141951d8d8749d8.png?wx_fmt=other\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"other\" data-w=\"1080\" \/><noscript><img class=\"rich_pages wxw-img\" data-ratio=\"0.5268518518518519\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-51\/20230830141951d8d8749d8.png?wx_fmt=other\" data-type=\"other\" data-w=\"1080\" \/><\/noscript><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u539f\u7406\uff1a<\/span><\/p>\n<ul class=\"list-paddingleft-1\" style=\"margin-top: 8px; margin-bottom: 8px; padding-left: 2em;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li style=\"color: #666666; font-size: 16px;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><span style=\"font-size: 16px;\">canal \u6a21\u62df MySQL slave \u7684\u4ea4\u4e92\u534f\u8bae\uff0c\u4f2a\u88c5\u81ea\u5df1\u4e3a MySQL slave \uff0c\u5411 MySQL master \u53d1\u9001dump \u534f\u8bae<\/span><\/section>\n<\/li>\n<li style=\"color: #666666; font-size: 16px;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><span style=\"font-size: 16px;\">MySQL master \u6536\u5230 dump \u8bf7\u6c42\uff0c\u5f00\u59cb\u63a8\u9001 binary log \u7ed9 slave (\u5373 canal )<\/span><\/section>\n<\/li>\n<li style=\"color: #666666; font-size: 16px;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><span style=\"font-size: 16px;\">canal \u89e3\u6790 binary log \u5bf9\u8c61(\u539f\u59cb\u4e3a byte \u6d41)<\/span><\/section>\n<\/li>\n<\/ul>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u518d\u6bd4\u5982\uff0cdebezium(\u97f3\u540c dbzm \u6ef4BZ\u59c6)\u5f88\u591a\u4eba\u53ef\u80fd\u4e0d\u592a\u4e86\u89e3. \u5305\u62ecdatabus\uff0cmaxwell\uff0cflink cdc\uff08\u5927\u6570\u636e\u9886\u57df\uff09\u7b49\u7b49\uff0c\u5b83\u4eec\u540c\u5c5eCDC\u6355\u83b7\u6570\u636e\u66f4\u6539(change data capture)\u7c7b\u7684\u6280\u672f\u3002<\/span><\/p>\n<p><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.5623556581986143\" data-data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-52\/202308301419527474632aa.png?wx_fmt=other\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"other\" data-w=\"866\" \/><noscript><img class=\"rich_pages wxw-img\" data-ratio=\"0.5623556581986143\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-52\/202308301419527474632aa.png?wx_fmt=other\" data-type=\"other\" data-w=\"866\" \/><\/noscript><\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\"><\/h2>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong><span style=\"font-size: 20px;\">\u4e3a\u4ec0\u4e48\u662fdebezium<\/span><\/strong><\/h2>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\"><\/h2>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u8fd9\u4e48\u591a\u6280\u672f\u6846\u67b6\uff0c\u4e3a\u4ec0\u4e48\u9009debezium\uff1f<\/span><\/h2>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u770b\u8d77\u6765\u5f88\u591a\u3002\u4f46\u4e00\u4e00\u6392\u9664\u4e0b\u6765\u5c31debezium\u548ccanal\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">sqoop,kettle,datax\u4e4b\u7c7b\u7684\u5de5\u5177\uff0c\u5c5e\u4e8e\u524d\u5927\u6570\u636e\u65f6\u4ee3\u7684\u4ea7\u7269\uff0c\u5730\u4f4d\u7c7b\u4f3c\u4e8eweb\u9886\u57df\u7684structs2\u3002\u800c\u4e14\uff0c\u5b83\u4eec\u57fa\u4e8e\u67e5\u8be2\u800c\u975ebinlog\u65e5\u5fd7\uff0c\u5176\u5b9e\u4e0d\u5c5e\u4e8eCDC\u3002\u9996\u5148\u6392\u9664\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">flink cdc\u662f\u5927\u6570\u636e\u9886\u57df\u7684\u6846\u67b6\uff0c\u4e00\u822cweb\u9879\u76ee\u7684\u6570\u636e\u91cf\u5c5e\u4e8e\u5927\u6750\u5c0f\u7528\u4e86\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u540c\u65f6databus,maxwell\u76f8\u5bf9\u6bd4\u8f83\u51b7\u95e8\uff0c\u7528\u5f97\u6bd4\u8f83\u5c11\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\"><strong style=\"color: #165eca;\">\u6700\u540e\u4e0d\u7528canal\u7684\u539f\u56e0\u6709\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/strong><\/span><\/p>\n<ul class=\"list-paddingleft-1\" style=\"margin-top: 8px; margin-bottom: 8px; padding-left: 2em;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li style=\"color: #666666; font-size: 16px;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><span style=\"font-size: 16px;\">canal\u9700\u8981\u5b89\u88c5\uff0c\u8fd9\u8fdd\u80cc\u4e86\u201c\u5982\u975e\u5fc5\u8981\uff0c\u52ff\u589e\u5b9e\u4f53\u201d\u7684\u539f\u5219\u3002<\/span><\/section>\n<\/li>\n<li style=\"color: #666666; font-size: 16px;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><span style=\"font-size: 16px;\">canal\u53ea\u80fd\u5bf9MYSQL\u8fdb\u884cCDC\u76d1\u63a7\u3002\u6709\u5f88\u5927\u7684\u5c40\u9650\u6027\u3002<\/span><\/section>\n<\/li>\n<li style=\"color: #666666; font-size: 16px;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><span style=\"font-size: 16px;\">\u5927\u6570\u636e\u9886\u57df\u975e\u5e38\u6d41\u884c\u7684flink cdc(\u963f\u91cc\u56e2\u961f\u4e3b\u5bfc)\u5e95\u5c42\u4f7f\u7528\u7684\u4e5f\u662fdebezium\uff0c\u800c\u975e\u540c\u662f\u963f\u91cc\u51fa\u54c1\u7684canal\u3002<\/span><\/section>\n<\/li>\n<li style=\"color: #666666; font-size: 16px;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><span style=\"font-size: 16px;\">debezium\u53ef\u501f\u52a9kafka\u7ec4\u4ef6\uff0c\u5c06\u53d8\u52a8\u7684\u6570\u636e\u53d1\u5230kafka topic\uff0c\u540e\u7eed\u7684\u8bfb\u53d6\u64cd\u4f5c\u53ea\u9700\u8bfb\u53d6kafka,\u53ef\u6709\u6548\u51cf\u5c11\u6570\u636e\u5e93\u7684\u8bfb\u53d6\u538b\u529b\u3002\u53ef\u4fdd\u8bc1\u4e00\u6b21\u8bed\u4e49\uff0c\u81f3\u5c11\u4e00\u6b21\u8bed\u4e49\u3002<\/span><\/section>\n<\/li>\n<li style=\"color: #666666; font-size: 16px;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><span style=\"font-size: 16px;\">\u540c\u65f6\uff0c\u4e5f\u53ef\u57fa\u4e8e\u5185\u5d4c\u90e8\u7f72\u6a21\u5f0f\uff0c\u65e0\u9700\u6211\u4eec\u624b\u52a8\u90e8\u7f72kafka\u96c6\u7fa4\uff0c\u53ef\u6ee1\u8db3\u201d\u5982\u975e\u5fc5\u8981\uff0c\u52ff\u589e\u5b9e\u4f53\u201c\u7684\u539f\u5219\u3002<\/span><\/section>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.22777777777777777\" data-data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-53\/20230830141953d3d3cead3.png?wx_fmt=other\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"other\" data-w=\"1080\" \/><noscript><img class=\"rich_pages wxw-img\" data-ratio=\"0.22777777777777777\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-53\/20230830141953d3d3cead3.png?wx_fmt=other\" data-type=\"other\" data-w=\"1080\" \/><\/noscript><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">Debezium\u662f\u4e00\u4e2a\u6355\u83b7\u6570\u636e\u66f4\u6539(CDC)\u5e73\u53f0\uff0c\u5e76\u4e14\u5229\u7528Kafka\u548cKafka Connect\u5b9e\u73b0\u4e86\u81ea\u5df1\u7684\u6301\u4e45\u6027\u3001\u53ef\u9760\u6027\u548c\u5bb9\u9519\u6027\u3002<\/span><\/p>\n<blockquote style=\"border-top: none; border-right: none; border-bottom: none; font-size: 0.9em; overflow: auto; color: #6a737d; padding: 10px 10px 10px 20px; margin-bottom: 20px; margin-top: 20px; background: #f9f9f9; border-left-color: #5c9dff;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<p style=\"font-size: 16px; line-height: 26px; color: #999999; padding-top: 3px; padding-bottom: 3px;\">\u6bcf\u4e00\u4e2a\u90e8\u7f72\u5728Kafka Connect\u5206\u5e03\u5f0f\u7684\u3001\u53ef\u6269\u5c55\u7684\u3001\u5bb9\u9519\u6027\u7684\u670d\u52a1\u4e2d\u7684connector\u76d1\u63a7\u4e00\u4e2a\u4e0a\u6e38\u6570\u636e\u5e93\u670d\u52a1\u5668\uff0c\u6355\u83b7\u6240\u6709\u7684\u6570\u636e\u5e93\u66f4\u6539\uff0c\u7136\u540e\u8bb0\u5f55\u5230\u4e00\u4e2a\u6216\u8005\u591a\u4e2aKafka topic(\u901a\u5e38\u4e00\u4e2a\u6570\u636e\u5e93\u8868\u5bf9\u5e94\u4e00\u4e2akafka topic)\u3002<\/p>\n<p style=\"font-size: 16px; line-height: 26px; color: #999999; padding-top: 3px; padding-bottom: 3px;\">Kafka\u786e\u4fdd\u6240\u6709\u8fd9\u4e9b\u6570\u636e\u66f4\u6539\u4e8b\u4ef6\u90fd\u80fd\u591f\u591a\u526f\u672c\u5e76\u4e14\u603b\u4f53\u4e0a\u6709\u5e8f(Kafka\u53ea\u80fd\u4fdd\u8bc1\u4e00\u4e2atopic\u7684\u5355\u4e2a\u5206\u533a\u5185\u6709\u5e8f)\uff0c\u8fd9\u6837\u66f4\u591a\u7684\u5ba2\u6237\u7aef\u53ef\u4ee5\u72ec\u7acb\u6d88\u8d39\u540c\u6837\u7684\u6570\u636e\u66f4\u6539\u4e8b\u4ef6\u800c\u5bf9\u4e0a\u6e38\u6570\u636e\u5e93\u7cfb\u7edf\u9020\u6210\u7684\u5f71\u54cd\u964d\u5230\u5f88\u5c0f(\u5982\u679cN\u4e2a\u5e94\u7528\u90fd\u76f4\u63a5\u53bb\u76d1\u63a7\u6570\u636e\u5e93\u66f4\u6539\uff0c\u5bf9\u6570\u636e\u5e93\u7684\u538b\u529b\u4e3aN\uff0c\u800c\u7528debezium\u6c47\u62a5\u6570\u636e\u5e93\u66f4\u6539\u4e8b\u4ef6\u5230kafka\uff0c\u6240\u6709\u7684\u5e94\u7528\u90fd\u53bb\u6d88\u8d39kafka\u4e2d\u7684\u6d88\u606f\uff0c\u53ef\u4ee5\u628a\u5bf9\u6570\u636e\u5e93\u7684\u538b\u529b\u964d\u52301)\u3002\u53e6\u5916\uff0c\u5ba2\u6237\u7aef\u53ef\u4ee5\u968f\u65f6\u505c\u6b62\u6d88\u8d39\uff0c\u7136\u540e\u91cd\u542f\uff0c\u4ece\u4e0a\u6b21\u505c\u6b62\u6d88\u8d39\u7684\u5730\u65b9\u63a5\u7740\u6d88\u8d39\u3002\u6bcf\u4e2a\u5ba2\u6237\u7aef\u53ef\u4ee5\u81ea\u884c\u51b3\u5b9a\u4ed6\u4eec\u662f\u5426\u9700\u8981exactly-once\u6216\u8005at-least-once\u6d88\u606f\u4ea4\u4ed8\u8bed\u4e49\u4fdd\u8bc1\uff0c\u5e76\u4e14\u6240\u6709\u7684\u6570\u636e\u5e93\u6216\u8005\u8868\u7684\u66f4\u6539\u4e8b\u4ef6\u662f\u6309\u7167\u4e0a\u6e38\u6570\u636e\u5e93\u53d1\u751f\u7684\u987a\u5e8f\u88ab\u4ea4\u4ed8\u7684\u3002<\/p>\n<\/blockquote>\n<p><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.28703703703703703\" data-data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-53\/2023083014195328283ed9d.png?wx_fmt=other\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"other\" data-w=\"1080\" \/><noscript><img class=\"rich_pages wxw-img\" data-ratio=\"0.28703703703703703\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-53\/2023083014195328283ed9d.png?wx_fmt=other\" data-type=\"other\" data-w=\"1080\" \/><\/noscript><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u5bf9\u4e8e\u4e0d\u9700\u8981\u6216\u8005\u4e0d\u60f3\u8981\u8fd9\u79cd\u5bb9\u9519\u7ea7\u522b\u3001\u6027\u80fd\u3001\u53ef\u6269\u5c55\u6027\u3001\u53ef\u9760\u6027\u7684\u5e94\u7528\uff0c\u4ed6\u4eec\u53ef\u4ee5\u4f7f\u7528\u5185\u5d4c\u7684Debezium connector\u5f15\u64ce\u6765\u76f4\u63a5\u5728\u5e94\u7528\u5185\u90e8\u8fd0\u884cconnector\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u8fd9\u79cd\u5e94\u7528\u4ecd\u9700\u8981\u6d88\u8d39\u6570\u636e\u5e93\u66f4\u6539\u4e8b\u4ef6\uff0c\u4f46\u66f4\u5e0c\u671bconnector\u76f4\u63a5\u4f20\u9012\u7ed9\u5b83\uff0c\u800c\u4e0d\u662f\u6301\u4e45\u5316\u5230Kafka\u91cc\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px; color: rgba(0, 0, 0, 0.9); letter-spacing: 0.034em;\">\u00a0<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong><span style=\"color: rgba(0, 0, 0, 0.9); letter-spacing: 0.034em; font-size: 20px;\">\u7b80\u4ecb<\/span><\/strong><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\"><strong style=\"color: #165eca;\">Debezium\u662f\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\uff0c\u4e3a\u6355\u83b7\u6570\u636e\u66f4\u6539(change data capture,CDC)\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4f4e\u5ef6\u8fdf\u7684\u6d41\u5f0f\u5904\u7406\u5e73\u53f0\u3002<\/strong> \u4f60\u53ef\u4ee5\u5b89\u88c5\u5e76\u4e14\u914d\u7f6eDebezium\u53bb\u76d1\u63a7\u4f60\u7684\u6570\u636e\u5e93\uff0c\u7136\u540e\u4f60\u7684\u5e94\u7528\u5c31\u53ef\u4ee5\u6d88\u8d39\u5bf9\u6570\u636e\u5e93\u7684\u6bcf\u4e00\u4e2a\u884c\u7ea7\u522b(row-level)\u7684\u66f4\u6539\u3002\u53ea\u6709\u5df2\u63d0\u4ea4\u7684\u66f4\u6539\u624d\u662f\u53ef\u89c1\u7684\uff0c\u6240\u4ee5\u4f60\u7684\u5e94\u7528\u4e0d\u7528\u62c5\u5fc3\u4e8b\u52a1(transaction)\u6216\u8005\u66f4\u6539\u88ab\u56de\u6eda(roll back)\u3002Debezium\u4e3a\u6240\u6709\u7684\u6570\u636e\u5e93\u66f4\u6539\u4e8b\u4ef6\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7edf\u4e00\u7684\u6a21\u578b\uff0c\u6240\u4ee5\u4f60\u7684\u5e94\u7528\u4e0d\u7528\u62c5\u5fc3\u6bcf\u4e00\u79cd\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u7684\u9519\u7efc\u590d\u6742\u6027\u3002\u53e6\u5916\uff0c\u7531\u4e8eDebezium\u7528\u6301\u4e45\u5316\u7684\u3001\u6709\u526f\u672c\u5907\u4efd\u7684\u65e5\u5fd7\u6765\u8bb0\u5f55\u6570\u636e\u5e93\u6570\u636e\u53d8\u5316\u7684\u5386\u53f2\uff0c\u56e0\u6b64\uff0c\u4f60\u7684\u5e94\u7528\u53ef\u4ee5\u968f\u65f6\u505c\u6b62\u518d\u91cd\u542f\uff0c\u800c\u4e0d\u4f1a\u9519\u8fc7\u5b83\u505c\u6b62\u8fd0\u884c\u65f6\u53d1\u751f\u7684\u4e8b\u4ef6\uff0c\u4fdd\u8bc1\u4e86\u6240\u6709\u7684\u4e8b\u4ef6\u90fd\u80fd\u88ab\u6b63\u786e\u5730\u3001\u5b8c\u5168\u5730\u5904\u7406\u6389\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\"><strong style=\"color: #165eca;\">\u76d1\u63a7\u6570\u636e\u5e93\uff0c\u5e76\u4e14\u5728\u6570\u636e\u53d8\u52a8\u7684\u65f6\u5019\u83b7\u5f97\u901a\u77e5\u4e00\u76f4\u662f\u5f88\u590d\u6742\u7684\u4e8b\u60c5\u3002<\/strong> \u5173\u7cfb\u578b\u6570\u636e\u5e93\u7684\u89e6\u53d1\u5668\u53ef\u4ee5\u505a\u5230\uff0c\u4f46\u662f\u53ea\u5bf9\u7279\u5b9a\u7684\u6570\u636e\u5e93\u6709\u6548\uff0c\u800c\u4e14\u901a\u5e38\u53ea\u80fd\u66f4\u65b0\u6570\u636e\u5e93\u5185\u7684\u72b6\u6001(\u65e0\u6cd5\u548c\u5916\u90e8\u7684\u8fdb\u7a0b\u901a\u4fe1)\u3002\u4e00\u4e9b\u6570\u636e\u5e93\u63d0\u4f9b\u4e86\u76d1\u63a7\u6570\u636e\u53d8\u52a8\u7684API\u6216\u8005\u6846\u67b6\uff0c\u4f46\u662f\u6ca1\u6709\u4e00\u4e2a\u6807\u51c6\uff0c\u6bcf\u79cd\u6570\u636e\u5e93\u7684\u5b9e\u73b0\u65b9\u5f0f\u90fd\u662f\u4e0d\u540c\u7684\uff0c\u5e76\u4e14\u9700\u8981\u5927\u91cf\u7279\u5b9a\u7684\u77e5\u8bc6\u548c\u7406\u89e3\u7279\u5b9a\u7684\u4ee3\u7801\u624d\u80fd\u8fd0\u7528\u3002\u786e\u4fdd\u4ee5\u76f8\u540c\u7684\u987a\u5e8f\u67e5\u770b\u548c\u5904\u7406\u6240\u6709\u66f4\u6539\uff0c\u540c\u65f6\u6700\u5c0f\u5316\u5f71\u54cd\u6570\u636e\u5e93\u4ecd\u7136\u975e\u5e38\u5177\u6709\u6311\u6218\u6027\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\"><strong style=\"color: #165eca;\">Debezium\u63d0\u4f9b\u4e86\u6a21\u5757\u4e3a\u4f60\u505a\u8fd9\u4e9b\u590d\u6742\u7684\u5de5\u4f5c\u3002<\/strong> \u4e00\u4e9b\u6a21\u5757\u662f\u901a\u7528\u7684\uff0c\u5e76\u4e14\u80fd\u591f\u9002\u7528\u591a\u79cd\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\uff0c\u4f46\u5728\u529f\u80fd\u548c\u6027\u80fd\u65b9\u9762\u4ecd\u6709\u4e00\u4e9b\u9650\u5236\u3002\u53e6\u4e00\u4e9b\u6a21\u5757\u662f\u4e3a\u7279\u5b9a\u7684\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u5b9a\u5236\u7684\uff0c\u6240\u4ee5\u4ed6\u4eec\u901a\u5e38\u53ef\u4ee5\u66f4\u591a\u5730\u5229\u7528\u6570\u636e\u5e93\u7cfb\u7edf\u672c\u8eab\u7684\u7279\u6027\u6765\u63d0\u4f9b\u66f4\u591a\u529f\u80fd\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\"><strong style=\"color: #165eca;\">github\u5b98\u7f51\u4e0a\u7f57\u5217\u7684\u4e00\u4e9b\u5178\u578b\u5e94\u7528\u573a\u666f\uff1a<\/strong><\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\"><strong style=\"color: #165eca;\">\u7f13\u5b58\u5931\u6548(Cache invalidation)<\/strong><\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u7ecf\u5178\u95ee\u9898 Redis\u4e0eMySQL\u53cc\u5199\u4e00\u81f4\u6027\u5982\u4f55\u4fdd\u8bc1\uff1fDebezium\u5229\u7528kafka\u5355\u5206\u533a\u7684\u6709\u5e8f\u6027(\u5ffd\u7565mysql binlog\u672c\u8eab\u53ef\u80fd\u7684\u5ef6\u8fdf\u548c\u4e71\u5e8f)\uff0c\u53ef\u5b8c\u5168\u89e3\u51b3\u6b64\u95ee\u9898\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u5728\u7f13\u5b58\u4e2d\u7f13\u5b58\u7684\u6761\u76ee(entry)\u5728\u6e90\u5934\u88ab\u66f4\u6539\u6216\u8005\u88ab\u5220\u9664\u7684\u65f6\u5019\u7acb\u5373\u8ba9\u7f13\u5b58\u4e2d\u7684\u6761\u76ee\u5931\u6548\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u5982\u679c\u7f13\u5b58\u5728\u4e00\u4e2a\u72ec\u7acb\u7684\u8fdb\u7a0b\u4e2d\u8fd0\u884c(\u4f8b\u5982Redis\uff0cMemcache\uff0cInfinispan\u6216\u8005\u5176\u4ed6\u7684)\uff0c\u90a3\u4e48\u7b80\u5355\u7684\u7f13\u5b58\u5931\u6548\u903b\u8f91\u53ef\u4ee5\u653e\u5728\u72ec\u7acb\u7684\u8fdb\u7a0b\u6216\u670d\u52a1\u4e2d\uff0c\u4ece\u800c\u7b80\u5316\u4e3b\u5e94\u7528\u7684\u903b\u8f91\u3002\u5728\u4e00\u4e9b\u573a\u666f\u4e2d\uff0c\u7f13\u5b58\u5931\u6548\u903b\u8f91\u53ef\u4ee5\u66f4\u590d\u6742\u4e00\u70b9\uff0c\u8ba9\u5b83\u5229\u7528\u66f4\u6539\u4e8b\u4ef6\u4e2d\u7684\u66f4\u65b0\u6570\u636e\u53bb\u66f4\u65b0\u7f13\u5b58\u4e2d\u53d7\u5f71\u54cd\u7684\u6761\u76ee\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\"><strong style=\"color: #165eca;\">\u7b80\u5316\u5355\u4f53\u5e94\u7528(Simplifying monolithic applications)<\/strong><\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u8bb8\u591a\u5e94\u7528\u66f4\u65b0\u6570\u636e\u5e93\uff0c\u7136\u540e\u5728\u6570\u636e\u5e93\u4e2d\u7684\u66f4\u6539\u88ab\u63d0\u4ea4\u540e\uff0c\u505a\u4e00\u4e9b\u989d\u5916\u7684\u5de5\u4f5c\uff1a\u66f4\u65b0\u641c\u7d22\u7d22\u5f15\uff0c\u66f4\u65b0\u7f13\u5b58\uff0c\u53d1\u9001\u901a\u77e5\uff0c\u8fd0\u884c\u4e1a\u52a1\u903b\u8f91\uff0c\u7b49\u7b49\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u8fd9\u79cd\u60c5\u51b5\u901a\u5e38\u79f0\u4e3a\u53cc\u5199(dual-writes)\uff0c\u56e0\u4e3a\u5e94\u7528\u6ca1\u6709\u5728\u4e00\u4e2a\u4e8b\u52a1\u5185\u5199\u591a\u4e2a\u7cfb\u7edf\u3002\u8fd9\u6837\u4e0d\u4ec5\u5e94\u7528\u903b\u8f91\u590d\u6742\u96be\u4ee5\u7ef4\u62a4\uff0c\u800c\u4e14\u53cc\u5199\u5bb9\u6613\u4e22\u5931\u6570\u636e\u6216\u8005\u5728\u4e00\u4e9b\u7cfb\u7edf\u66f4\u65b0\u6210\u529f\u800c\u53e6\u4e00\u4e9b\u7cfb\u7edf\u6ca1\u6709\u66f4\u65b0\u6210\u529f\u7684\u65f6\u5019\u9020\u6210\u4e0d\u540c\u7cfb\u7edf\u4e4b\u95f4\u7684\u72b6\u6001\u4e0d\u4e00\u81f4\u3002\u4f7f\u7528\u6355\u83b7\u66f4\u6539\u6570\u636e\u6280\u672f(change data capture,CDC)\uff0c\u5728\u6e90\u6570\u636e\u5e93\u7684\u6570\u636e\u66f4\u6539\u63d0\u4ea4\u540e\uff0c\u8fd9\u4e9b\u989d\u5916\u7684\u5de5\u4f5c\u53ef\u4ee5\u88ab\u653e\u5728\u72ec\u7acb\u7684\u7ebf\u7a0b\u6216\u8005\u8fdb\u7a0b(\u670d\u52a1)\u4e2d\u5b8c\u6210\u3002\u8fd9\u79cd\u5b9e\u73b0\u65b9\u5f0f\u7684\u5bb9\u9519\u6027\u66f4\u597d\uff0c\u4e0d\u4f1a\u4e22\u5931\u4e8b\u4ef6\uff0c\u5bb9\u6613\u6269\u5c55\uff0c\u5e76\u4e14\u66f4\u5bb9\u6613\u652f\u6301\u5347\u7ea7\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\"><strong style=\"color: #165eca;\">\u5171\u4eab\u6570\u636e\u5e93(Sharing databases)<\/strong><\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u5f53\u591a\u4e2a\u5e94\u7528\u5171\u7528\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u7684\u65f6\u5019\uff0c\u4e00\u4e2a\u5e94\u7528\u63d0\u4ea4\u7684\u66f4\u6539\u901a\u5e38\u8981\u88ab\u53e6\u4e00\u4e2a\u5e94\u7528\u611f\u77e5\u5230\u3002\u4e00\u79cd\u5b9e\u73b0\u65b9\u5f0f\u662f\u4f7f\u7528\u6d88\u606f\u603b\u7ebf\uff0c \u5c3d\u7ba1\u975e\u4e8b\u52a1\u6027(non-transactional)\u7684\u6d88\u606f\u603b\u7ebf\u603b\u4f1a\u53d7\u4e0a\u9762\u63d0\u5230\u7684\u53cc\u5199(dual-writes)\u5f71\u54cd\u3002\u4f46\u662f\uff0c\u53e6\u4e00\u79cd\u5b9e\u73b0\u65b9\u5f0f\uff0c\u5373Debezium\uff0c\u53d8\u5f97\u5f88\u76f4\u63a5\uff1a\u6bcf\u4e2a\u5e94\u7528\u53ef\u4ee5\u76f4\u63a5\u76d1\u63a7\u6570\u636e\u5e93\u7684\u66f4\u6539\uff0c\u5e76\u4e14\u54cd\u5e94\u66f4\u6539\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\"><strong style=\"color: #165eca;\">\u6570\u636e\u96c6\u6210(Data integration)<\/strong><\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u6570\u636e\u901a\u5e38\u88ab\u5b58\u50a8\u5728\u591a\u4e2a\u5730\u65b9\uff0c\u5c24\u5176\u662f\u5f53\u6570\u636e\u88ab\u7528\u4e8e\u4e0d\u540c\u7684\u76ee\u7684\u7684\u65f6\u5019\uff0c\u4f1a\u6709\u4e0d\u540c\u7684\u5f62\u5f0f\u3002\u4fdd\u6301\u591a\u7cfb\u7edf\u7684\u540c\u6b65\u662f\u5f88\u6709\u6311\u6218\u6027\u7684\uff0c\u4f46\u662f\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Debezium\u52a0\u4e0a\u7b80\u5355\u7684\u4e8b\u4ef6\u5904\u7406\u903b\u8f91\u6765\u5b9e\u73b0\u7b80\u5355\u7684ETL\u7c7b\u578b\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\"><strong style=\"color: #165eca;\">\u547d\u4ee4\u67e5\u8be2\u804c\u8d23\u5206\u79bb(CQRS)<\/strong><\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u5728\u547d\u4ee4\u67e5\u8be2\u804c\u8d23\u5206\u79bb Command Query Responsibility Separation (CQRS) \u67b6\u6784\u6a21\u5f0f\u4e2d\uff0c\u66f4\u65b0\u6570\u636e\u4f7f\u7528\u4e86\u4e00\u79cd\u6570\u636e\u6a21\u578b\uff0c\u8bfb\u6570\u636e\u4f7f\u7528\u4e86\u4e00\u79cd\u6216\u8005\u591a\u79cd\u6570\u636e\u6a21\u578b\u3002\u7531\u4e8e\u6570\u636e\u66f4\u6539\u88ab\u8bb0\u5f55\u5728\u66f4\u65b0\u4fa7(update-side)\uff0c\u8fd9\u4e9b\u66f4\u6539\u5c06\u88ab\u5904\u7406\u4ee5\u66f4\u65b0\u5404\u79cd\u8bfb\u5c55\u793a\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u6240\u4ee5CQRS\u5e94\u7528\u901a\u5e38\u66f4\u590d\u6742\uff0c\u5c24\u5176\u662f\u4ed6\u4eec\u9700\u8981\u4fdd\u8bc1\u53ef\u9760\u6027\u548c\u5168\u5e8f(totally-ordered)\u5904\u7406\u3002Debezium\u548cCDC\u53ef\u4ee5\u4f7f\u8fd9\u79cd\u65b9\u5f0f\u66f4\u53ef\u884c\uff1a\u5199\u64cd\u4f5c\u88ab\u6b63\u5e38\u8bb0\u5f55\uff0c\u4f46\u662fDebezium\u6355\u83b7\u6570\u636e\u66f4\u6539\uff0c\u5e76\u4e14\u6301\u4e45\u5316\u5230\u5168\u5e8f\u6d41\u91cc\uff0c\u7136\u540e\u4f9b\u90a3\u4e9b\u9700\u8981\u5f02\u6b65\u66f4\u65b0\u53ea\u8bfb\u89c6\u56fe\u7684\u670d\u52a1\u6d88\u8d39\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u5199\u4fa7(write-side)\u8868\u53ef\u4ee5\u8868\u793a\u9762\u5411\u9886\u57df\u7684\u5b9e\u4f53(domain-oriented entities)\uff0c\u6216\u8005\u5f53CQRS\u548c Event Sourcing \u7ed3\u5408\u7684\u65f6\u5019\uff0c\u5199\u4fa7\u8868\u4ec5\u4ec5\u7528\u505a\u8ffd\u52a0\u64cd\u4f5c\u547d\u4ee4\u4e8b\u4ef6\u7684\u65e5\u5fd7\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px; color: rgba(0, 0, 0, 0.9); letter-spacing: 0.034em;\">\u00a0<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong><span style=\"color: rgba(0, 0, 0, 0.9); letter-spacing: 0.034em; font-size: 20px;\">SpringBoot \u6574\u5408 Debezium<\/span><\/strong><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong><span style=\"color: #333333; letter-spacing: 0.034em; font-size: 18px;\">\u4f9d\u8d56<\/span><\/strong><\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"overflow-x: auto; padding: 16px; color: #abb2bf; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #282c34; border-radius: 5px;\"><span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">debezium.version<\/span>&gt;<\/span>1.7.0.Final<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">debezium.version<\/span>&gt;<\/span>\n<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">mysql.connector.version<\/span>&gt;<\/span>8.0.26<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">mysql.connector.version<\/span>&gt;<\/span>\n<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">dependency<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">groupId<\/span>&gt;<\/span>mysql<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">groupId<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">artifactId<\/span>&gt;<\/span>mysql-connector-java<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">artifactId<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">version<\/span>&gt;<\/span>${mysql.connector.version}<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">version<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">scope<\/span>&gt;<\/span>runtime<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">scope<\/span>&gt;<\/span>\n<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">dependency<\/span>&gt;<\/span>\n<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">dependency<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">groupId<\/span>&gt;<\/span>io.debezium<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">groupId<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">artifactId<\/span>&gt;<\/span>debezium-api<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">artifactId<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">version<\/span>&gt;<\/span>${debezium.version}<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">version<\/span>&gt;<\/span>\n<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">dependency<\/span>&gt;<\/span>\n<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">dependency<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">groupId<\/span>&gt;<\/span>io.debezium<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">groupId<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">artifactId<\/span>&gt;<\/span>debezium-embedded<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">artifactId<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">version<\/span>&gt;<\/span>${debezium.version}<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">version<\/span>&gt;<\/span>\n<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">dependency<\/span>&gt;<\/span>\n<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">dependency<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">groupId<\/span>&gt;<\/span>io.debezium<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">groupId<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">artifactId<\/span>&gt;<\/span>debezium-connector-mysql<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">artifactId<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">version<\/span>&gt;<\/span>${debezium.version}<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">version<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">exclusions<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">exclusion<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">groupId<\/span>&gt;<\/span>mysql<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">groupId<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;<span style=\"color: #e06c75; line-height: 26px;\">artifactId<\/span>&gt;<\/span>mysql-connector-java<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">artifactId<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">exclusion<\/span>&gt;<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">exclusions<\/span>&gt;<\/span>\n<span style=\"line-height: 26px;\">&lt;\/<span style=\"color: #e06c75; line-height: 26px;\">dependency<\/span>&gt;<\/span>\n<\/code><\/pre>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u6ce8\u610fdebezium\u7248\u672c\u4e3a1.7.0.Final\uff0c\u5bf9\u5e94mysql\u9a71\u52a8\u4e3a8.0.26\uff0c\u4f4e\u4e8e\u8fd9\u4e2a\u7248\u672c\u4f1a\u62a5\u517c\u5bb9\u9519\u8bef\u3002<\/span><\/p>\n<h3 style=\"margin-top: 30px; margin-bottom: 15px; color: #333333; font-size: 1.2em;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong><span style=\"font-size: 18px;\">\u914d\u7f6e<\/span><\/strong><\/h3>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u76f8\u5e94\u7684\u914d\u7f6e<\/span><\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"overflow-x: auto; padding: 16px; color: #abb2bf; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #282c34; border-radius: 5px;\">debezium.datasource.hostname = localhost\ndebezium.datasource.port = 3306\ndebezium.datasource.user = root\ndebezium.datasource.password = 123456\ndebezium.datasource.tableWhitelist = test.test\ndebezium.datasource.storageFile = E:\/debezium\/test\/offsets\/offset.dat\ndebezium.datasource.historyFile = E:\/debezium\/test\/history\/custom-file-db-history.dat\ndebezium.datasource.flushInterval = 10000\ndebezium.datasource.serverId = 1\ndebezium.datasource.serverName = name-1\n<\/code><\/pre>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u7136\u540e\u8fdb\u884c\u914d\u7f6e\u521d\u59cb\u5316\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u4e3b\u8981\u7684\u914d\u7f6e\u9879\uff1a<\/span><\/p>\n<ul class=\"list-paddingleft-1\" style=\"margin-top: 8px; margin-bottom: 8px; padding-left: 2em;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li style=\"color: #666;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">connector.class<\/span><\/code><span style=\"font-size: 16px;\"> \u76d1\u63a7\u7684\u6570\u636e\u5e93\u7c7b\u578b\uff0c\u8fd9\u91cc\u9009mysql\u3002<\/span><\/section>\n<\/li>\n<li style=\"color: #666;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">offset.storage<\/span><\/code><span style=\"font-size: 16px;\"> \u9009\u62e9<\/span><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">FileOffsetBackingStore<\/span><\/code><span style=\"font-size: 16px;\">\u65f6,\u610f\u601d\u628a\u8bfb\u53d6\u8fdb\u5ea6\u5b58\u5230\u672c\u5730\u6587\u4ef6\uff0c\u56e0\u4e3a\u6211\u4eec\u4e0d\u7528kafka\uff0c\u5f53\u4f7f\u7528kafka\u65f6\uff0c\u9009<\/span><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">KafkaOffsetBackingStore <\/span><\/code><span style=\"font-size: 16px;\">\u3002<\/span><\/section>\n<\/li>\n<li style=\"color: #666;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">offset.storage.file.filename<\/span><\/code><span style=\"font-size: 16px;\"> \u00a0\u5b58\u653e\u8bfb\u53d6\u8fdb\u5ea6\u7684\u672c\u5730\u6587\u4ef6\u5730\u5740\u3002<\/span><\/section>\n<\/li>\n<li style=\"color: #666;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">offset.flush.interval.ms<\/span><\/code><span style=\"font-size: 16px;\"> \u00a0\u8bfb\u53d6\u8fdb\u5ea6\u5237\u65b0\u4fdd\u5b58\u9891\u7387\uff0c\u9ed8\u8ba41\u5206\u949f\u3002\u5982\u679c\u4e0d\u4f9d\u8d56kafka\u7684\u8bdd\uff0c\u5e94\u8be5\u5c31\u6ca1\u6709exactly once\u53ea\u8bfb\u53d6\u4e00\u6b21\u8bed\u4e49\uff0c\u5e94\u8be5\u662f\u81f3\u5c11\u8bfb\u53d6\u4e00\u6b21\u3002\u610f\u5473\u7740\u53ef\u80fd\u91cd\u590d\u8bfb\u53d6\u3002\u5982\u679cweb\u5bb9\u5668\u6302\u4e86\uff0c\u6700\u65b0\u7684\u8bfb\u53d6\u8fdb\u5ea6\u6ca1\u6709\u5237\u65b0\u5230\u6587\u4ef6\u91cc\uff0c\u4e0b\u6b21\u91cd\u542f\u65f6\uff0c\u5c31\u4f1a\u91cd\u590d\u8bfb\u53d6binlog\u3002<\/span><\/section>\n<\/li>\n<li style=\"color: #666;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">table.whitelist<\/span><\/code><span style=\"font-size: 16px;\"> \u76d1\u63a7\u7684\u8868\u540d\u767d\u540d\u5355,\u5efa\u8bae\u8bbe\u7f6e\u6b64\u503c\uff0c\u53ea\u76d1\u63a7\u8fd9\u4e9b\u8868\u7684binlog\u3002<\/span><\/section>\n<\/li>\n<li style=\"color: #666;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">database.whitelist<\/span><\/code><span style=\"font-size: 16px;\"> \u76d1\u63a7\u7684\u6570\u636e\u5e93\u767d\u540d\u5355,\u5982\u679c\u9009\u6b64\u503c\uff0c\u4f1a\u5ffd\u7565<\/span><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">table.whitelist<\/span><\/code><span style=\"font-size: 16px;\">\uff0c\u7136\u540e\u76d1\u63a7\u6b64db\u4e0b\u6240\u6709\u8868\u7684binlog\u3002<\/span><\/section>\n<\/li>\n<\/ul>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"overflow-x: auto; padding: 16px; color: #abb2bf; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #282c34; border-radius: 5px;\"><span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0io.debezium.connector.mysql.MySqlConnector;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0io.debezium.relational.history.FileDatabaseHistory;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0lombok.Data;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0org.apache.kafka.connect.storage.FileOffsetBackingStore;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0org.springframework.boot.context.properties.ConfigurationProperties;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0org.springframework.context.annotation.Bean;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0org.springframework.context.annotation.Configuration;\n\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0java.io.File;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0java.io.IOException;\n\n<span style=\"color: #61aeee; line-height: 26px;\">@Configuration<\/span>\n<span style=\"color: #61aeee; line-height: 26px;\">@ConfigurationProperties<\/span>(prefix\u00a0=<span style=\"color: #98c379; line-height: 26px;\">\"debezium.datasource\"<\/span>)\n<span style=\"color: #61aeee; line-height: 26px;\">@Data<\/span>\n<span style=\"color: #c678dd; line-height: 26px;\">public<\/span>\u00a0<span style=\"line-height: 26px;\"><span style=\"color: #c678dd; line-height: 26px;\">class<\/span>\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">MysqlBinlogConfig<\/span>\u00a0<\/span>{\n\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0String\u00a0hostname;\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0String\u00a0port;\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0String\u00a0user;\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0String\u00a0password;\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0String\u00a0tableWhitelist;\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0String\u00a0storageFile;\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0String\u00a0historyFile;\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0Long\u00a0flushInterval;\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0String\u00a0serverId;\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0String\u00a0serverName;\n\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #61aeee; line-height: 26px;\">@Bean<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">public<\/span>\u00a0io.debezium.config.<span style=\"line-height: 26px;\">Configuration\u00a0<span style=\"color: #61aeee; line-height: 26px;\">MysqlBinlogConfig<\/span>\u00a0<span style=\"line-height: 26px;\">()<\/span>\u00a0<span style=\"color: #c678dd; line-height: 26px;\">throws<\/span>\u00a0Exception\u00a0<\/span>{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0checkFile();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0io.debezium.config.Configuration\u00a0configuration\u00a0=\u00a0io.debezium.config.Configuration.create()\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.with(<span style=\"color: #98c379; line-height: 26px;\">\"name\"<\/span>,\u00a0<span style=\"color: #98c379; line-height: 26px;\">\"mysql_connector\"<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.with(<span style=\"color: #98c379; line-height: 26px;\">\"connector.class\"<\/span>,\u00a0MySqlConnector<span style=\"line-height: 26px;\">.<span style=\"color: #c678dd; line-height: 26px;\">class<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">offset<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">storage<\/span>\",\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">KafkaOffsetBackingStore<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">class<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">offset<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">storage<\/span>\",\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">FileOffsetBackingStore<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">class<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">offset<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">storage<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">file<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">filename<\/span>\",\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">storageFile<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">offset<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">flush<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">interval<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">ms<\/span>\",\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">flushInterval<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">database<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">history<\/span>\",\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">FileDatabaseHistory<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">class<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">getName<\/span>())\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">database<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">history<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">file<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">filename<\/span>\",\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">historyFile<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">snapshot<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">mode<\/span>\",\u00a0\"<span style=\"color: #e6c07b; line-height: 26px;\">Schema_only<\/span>\")\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">database<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">server<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">id<\/span>\",\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">serverId<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">database<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">server<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">name<\/span>\",\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">serverName<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">database<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">hostname<\/span>\",\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">hostname<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">database<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">dbname<\/span>\",\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">dbname<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">database<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">port<\/span>\",\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">port<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">database<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">user<\/span>\",\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">user<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">database<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">password<\/span>\",\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">password<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">database<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">whitelist<\/span>\",\u00a0\"<span style=\"color: #e6c07b; line-height: 26px;\">test<\/span>\")\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">with<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">table<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">whitelist<\/span>\",\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">tableWhitelist<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">build<\/span>()<\/span>;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">return<\/span>\u00a0configuration;\n\n\u00a0\u00a0\u00a0\u00a0}\n\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\"><span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0<span style=\"color: #c678dd; line-height: 26px;\">void<\/span>\u00a0<span style=\"color: #61aeee; line-height: 26px;\">checkFile<\/span><span style=\"line-height: 26px;\">()<\/span>\u00a0<span style=\"color: #c678dd; line-height: 26px;\">throws<\/span>\u00a0IOException\u00a0<\/span>{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0String\u00a0dir\u00a0=\u00a0storageFile.substring(<span style=\"color: #d19a66; line-height: 26px;\">0<\/span>,\u00a0storageFile.lastIndexOf(<span style=\"color: #98c379; line-height: 26px;\">\"\/\"<\/span>));\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0File\u00a0dirFile\u00a0=\u00a0<span style=\"color: #c678dd; line-height: 26px;\">new<\/span>\u00a0File(dir);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">if<\/span>(!dirFile.exists()){\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0dirFile.mkdirs();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0File\u00a0file\u00a0=\u00a0<span style=\"color: #c678dd; line-height: 26px;\">new<\/span>\u00a0File(storageFile);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">if<\/span>(!file.exists()){\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0file.createNewFile();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0}\n}\n<\/code><\/pre>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">snapshot.mode<\/span><\/code><span style=\"font-size: 16px;\"> \u5feb\u7167\u6a21\u5f0f\uff0c\u6307\u5b9a\u8fde\u63a5\u5668\u542f\u52a8\u65f6\u8fd0\u884c\u5feb\u7167\u7684\u6761\u4ef6\u3002\u53ef\u80fd\u7684\u8bbe\u7f6e\u6709:<\/span><\/p>\n<ul class=\"list-paddingleft-1\" style=\"margin-top: 8px; margin-bottom: 8px; padding-left: 2em;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li style=\"color: #666;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">initial<\/span><\/code><span style=\"font-size: 16px;\">\u53ea\u6709\u5728\u6ca1\u6709\u4e3a\u903b\u8f91\u670d\u52a1\u5668\u540d\u8bb0\u5f55\u504f\u79fb\u91cf\u65f6\uff0c\u8fde\u63a5\u5668\u624d\u8fd0\u884c\u5feb\u7167\u3002<\/span><\/section>\n<\/li>\n<li style=\"color: #666;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">When_needed<\/span><\/code><span style=\"font-size: 16px;\">\u5f53\u8fde\u63a5\u5668\u8ba4\u4e3a\u6709\u5fc5\u8981\u65f6\uff0c\u5b83\u4f1a\u5728\u542f\u52a8\u65f6\u8fd0\u884c\u5feb\u7167\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u5f53\u6ca1\u6709\u53ef\u7528\u7684\u504f\u79fb\u91cf\u65f6\uff0c\u6216\u8005\u5f53\u5148\u524d\u8bb0\u5f55\u7684\u504f\u79fb\u91cf\u6307\u5b9a\u4e86\u670d\u52a1\u5668\u4e2d\u4e0d\u53ef\u7528\u7684binlog\u4f4d\u7f6e\u6216GTID\u65f6\u3002<\/span><\/section>\n<\/li>\n<li style=\"color: #666;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">Never<\/span><\/code><span style=\"font-size: 16px;\">\u8fde\u63a5\u5668\u4ece\u4e0d\u4f7f\u7528\u5feb\u7167\u3002\u5728\u7b2c\u4e00\u6b21\u4f7f\u7528\u903b\u8f91\u670d\u52a1\u5668\u540d\u542f\u52a8\u65f6\uff0c\u8fde\u63a5\u5668\u4ecebinlog\u7684\u5f00\u5934\u8bfb\u53d6\u3002\u8c28\u614e\u914d\u7f6e\u6b64\u884c\u4e3a\u3002\u53ea\u6709\u5f53binlog\u4fdd\u8bc1\u5305\u542b\u6570\u636e\u5e93\u7684\u6574\u4e2a\u5386\u53f2\u8bb0\u5f55\u65f6\uff0c\u5b83\u624d\u6709\u6548\u3002<\/span><\/section>\n<\/li>\n<li style=\"color: #666;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">Schema_only<\/span><\/code><span style=\"font-size: 16px;\">\u8fde\u63a5\u5668\u8fd0\u884c\u6a21\u5f0f\u800c\u4e0d\u662f\u6570\u636e\u7684\u5feb\u7167\u3002\u5f53\u60a8\u4e0d\u9700\u8981\u4e3b\u9898\u5305\u542b\u6570\u636e\u7684\u4e00\u81f4\u5feb\u7167\uff0c\u800c\u53ea\u9700\u8981\u4e3b\u9898\u5305\u542b\u81ea\u8fde\u63a5\u5668\u542f\u52a8\u4ee5\u6765\u7684\u66f4\u6539\u65f6\uff0c\u6b64\u8bbe\u7f6e\u975e\u5e38\u6709\u7528\u3002<\/span><\/section>\n<\/li>\n<li style=\"color: #666;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">Schema_only_recovery<\/span><\/code><span style=\"font-size: 16px;\">\u8fd9\u662f\u5df2\u7ecf\u6355\u83b7\u66f4\u6539\u7684\u8fde\u63a5\u5668\u7684\u6062\u590d\u8bbe\u7f6e\u3002\u5f53\u60a8\u91cd\u65b0\u542f\u52a8\u8fde\u63a5\u5668\u65f6\uff0c\u6b64\u8bbe\u7f6e\u5141\u8bb8\u6062\u590d\u635f\u574f\u6216\u4e22\u5931\u7684\u6570\u636e\u5e93\u5386\u53f2\u4e3b\u9898\u3002\u60a8\u53ef\u4ee5\u5b9a\u671f\u5c06\u5176\u8bbe\u7f6e\u4e3a\u201c\u6e05\u7406\u201d\u610f\u5916\u589e\u957f\u7684\u6570\u636e\u5e93\u5386\u53f2\u4e3b\u9898\u3002\u6570\u636e\u5e93\u5386\u53f2\u4e3b\u9898\u9700\u8981\u65e0\u9650\u4fdd\u7559\u3002<\/span><\/section>\n<\/li>\n<li style=\"color: #666666; font-size: 16px;\">\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\"><code style=\"font-size: 14px; padding: 2px 4px; border-radius: 4px; margin-right: 2px; margin-left: 2px; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #5c9dff;\"><span style=\"font-size: 16px;\">database.server.id<\/span><\/code><\/section>\n<\/li>\n<\/ul>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u4f2a\u88c5\u6210slave\u7684Debezium\u670d\u52a1\u7684id\uff0c\u81ea\u5b9a\u4e49\uff0c\u6709\u591a\u4e2aDebezium\u670d\u52a1\u4e0d\u80fd\u91cd\u590d\uff0c\u5982\u679c\u91cd\u590d\u7684\u8bdd\u4f1a\u62a5\u4ee5\u4e0b\u5f02\u5e38\u3002<\/span><\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"overflow-x: auto; padding: 16px; color: #abb2bf; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #282c34; border-radius: 5px;\">io.debezium.DebeziumException:\u00a0A\u00a0slave\u00a0with\u00a0the\u00a0same\u00a0server_uuid\/server_id\u00a0as\u00a0this\u00a0slave\u00a0has\u00a0connected\u00a0to\u00a0the\u00a0master;\u00a0the\u00a0first\u00a0event\u00a0<span style=\"color: #98c379; line-height: 26px;\">'binlog.000013'<\/span>\u00a0at\u00a046647257,\u00a0the\u00a0last\u00a0event\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">read<\/span>\u00a0from\u00a0<span style=\"color: #98c379; line-height: 26px;\">'.\/binlog.000013'<\/span>\u00a0at\u00a0125,\u00a0the\u00a0last\u00a0byte\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">read<\/span>\u00a0from\u00a0<span style=\"color: #98c379; line-height: 26px;\">'.\/binlog.000013'<\/span>\u00a0at\u00a046647257.\u00a0Error\u00a0code:\u00a01236;\u00a0SQLSTATE:\u00a0HY000.\n\u00a0at\u00a0io.debezium.connector.mysql.MySqlStreamingChangeEventSource.wrap(MySqlStreamingChangeEventSource.java:1167)\n\u00a0at\u00a0io.debezium.connector.mysql.MySqlStreamingChangeEventSource<span style=\"color: #d19a66; line-height: 26px;\">$ReaderThreadLifecycleListener<\/span>.onCommunicationFailure(MySqlStreamingChangeEventSource.java:1212)\n\u00a0at\u00a0com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:980)\n\u00a0at\u00a0com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:599)\n\u00a0at\u00a0com.github.shyiko.mysql.binlog.BinaryLogClient<span style=\"color: #d19a66; line-height: 26px;\">$7<\/span>.run(BinaryLogClient.java:857)\n\u00a0at\u00a0java.lang.Thread.run(Thread.java:750)\nCaused\u00a0by:\u00a0com.github.shyiko.mysql.binlog.network.ServerException:\u00a0A\u00a0slave\u00a0with\u00a0the\u00a0same\u00a0server_uuid\/server_id\u00a0as\u00a0this\u00a0slave\u00a0has\u00a0connected\u00a0to\u00a0the\u00a0master;\u00a0the\u00a0first\u00a0event\u00a0<span style=\"color: #98c379; line-height: 26px;\">'binlog.000013'<\/span>\u00a0at\u00a046647257,\u00a0the\u00a0last\u00a0event\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">read<\/span>\u00a0from\u00a0<span style=\"color: #98c379; line-height: 26px;\">'.\/binlog.000013'<\/span>\u00a0at\u00a0125,\u00a0the\u00a0last\u00a0byte\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">read<\/span>\u00a0from\u00a0<span style=\"color: #98c379; line-height: 26px;\">'.\/binlog.000013'<\/span>\u00a0at\u00a046647257.\n\u00a0at\u00a0com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:944)\n\u00a0...\u00a03\u00a0common\u00a0frames\u00a0omitted\n<\/code><\/pre>\n<h3 style=\"margin-top: 30px; margin-bottom: 15px; color: #333333; font-size: 1.2em;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong><span style=\"font-size: 18px;\">\u76d1\u542c<\/span><\/strong><\/h3>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u914d\u7f6e\u76d1\u542c\u670d\u52a1<\/span><\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"overflow-x: auto; padding: 16px; color: #abb2bf; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #282c34; border-radius: 5px;\"><span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0com.alibaba.fastjson.JSON;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0io.debezium.config.Configuration;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0io.debezium.data.Envelope;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0io.debezium.engine.ChangeEvent;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0io.debezium.engine.DebeziumEngine;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0io.debezium.engine.format.Json;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0lombok.Builder;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0lombok.Data;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0lombok.extern.slf4j.Slf4j;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0org.apache.commons.lang3.StringUtils;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0org.springframework.beans.factory.annotation.Qualifier;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0org.springframework.stereotype.Component;\n\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0javax.annotation.PostConstruct;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0javax.annotation.PreDestroy;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0javax.annotation.Resource;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0java.io.IOException;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0java.util.ArrayList;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0java.util.List;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0java.util.Map;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0java.util.Objects;\n<span style=\"color: #c678dd; line-height: 26px;\">import<\/span>\u00a0java.util.concurrent.Executor;\n\n<span style=\"color: #61aeee; line-height: 26px;\">@Component<\/span>\n<span style=\"color: #61aeee; line-height: 26px;\">@Slf<\/span>4j\n<span style=\"color: #c678dd; line-height: 26px;\">public<\/span>\u00a0<span style=\"line-height: 26px;\"><span style=\"color: #c678dd; line-height: 26px;\">class<\/span>\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">MysqlBinlogListener<\/span>\u00a0<\/span>{\n\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #61aeee; line-height: 26px;\">@Resource<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0Executor\u00a0taskExecutor;\n\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0<span style=\"color: #c678dd; line-height: 26px;\">final<\/span>\u00a0List&lt;DebeziumEngine&lt;ChangeEvent&lt;String,\u00a0String&gt;&gt;&gt;\u00a0engineList\u00a0=\u00a0<span style=\"color: #c678dd; line-height: 26px;\">new<\/span>\u00a0ArrayList&lt;&gt;();\n\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\"><span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0<span style=\"color: #61aeee; line-height: 26px;\">MysqlBinlogListener<\/span>\u00a0<span style=\"line-height: 26px;\">(@Qualifier(<span style=\"color: #98c379; line-height: 26px;\">\"mysqlConnector\"<\/span>)<\/span>\u00a0Configuration\u00a0configuration)\u00a0<\/span>{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">this<\/span>.engineList.add(DebeziumEngine.create(Json<span style=\"line-height: 26px;\">.<span style=\"color: #c678dd; line-height: 26px;\">class<\/span>)\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">using<\/span>(<span style=\"color: #e6c07b; line-height: 26px;\">configuration<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">asProperties<\/span>())\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">notifying<\/span>(<span style=\"color: #e6c07b; line-height: 26px;\">record<\/span>\u00a0-&gt;\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">receiveChangeEvent<\/span>(<span style=\"color: #e6c07b; line-height: 26px;\">record<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">value<\/span>()))\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">build<\/span>())<\/span>;\n\u00a0\u00a0\u00a0\u00a0}\n\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\"><span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0<span style=\"color: #c678dd; line-height: 26px;\">void<\/span>\u00a0<span style=\"color: #61aeee; line-height: 26px;\">receiveChangeEvent<\/span><span style=\"line-height: 26px;\">(String\u00a0value)<\/span>\u00a0<\/span>{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">if<\/span>\u00a0(Objects.nonNull(value))\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Map&lt;String,\u00a0Object&gt;\u00a0payload\u00a0=\u00a0getPayload(value);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0String\u00a0op\u00a0=\u00a0JSON.parseObject(JSON.toJSONString(payload.get(<span style=\"color: #98c379; line-height: 26px;\">\"op\"<\/span>)),\u00a0String<span style=\"line-height: 26px;\">.<span style=\"color: #c678dd; line-height: 26px;\">class<\/span>)<\/span>;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">if<\/span>\u00a0(!(StringUtils.isBlank(op)\u00a0||\u00a0Envelope.Operation.READ.equals(op)))\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ChangeData\u00a0changeData\u00a0=\u00a0getChangeData(payload);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #5c6370; font-style: italic; line-height: 26px;\">\/\/\u00a0\u8fd9\u91cc\u629b\u51fa\u5f02\u5e38\u4f1a\u5bfc\u81f4\u540e\u9762\u7684\u65e5\u5fd7\u76d1\u542c\u5931\u8d25<\/span>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">try<\/span>\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0mysqlBinlogService.service(changeData);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}<span style=\"color: #c678dd; line-height: 26px;\">catch<\/span>\u00a0(Exception\u00a0e){\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0log.error(<span style=\"color: #98c379; line-height: 26px;\">\"binlog\u5904\u7406\u5f02\u5e38\uff0c\u539f\u6570\u636e:\u00a0\"<\/span>\u00a0+\u00a0changeData,\u00a0e);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0}\n\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #61aeee; line-height: 26px;\">@PostConstruct<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\"><span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0<span style=\"color: #c678dd; line-height: 26px;\">void<\/span>\u00a0<span style=\"color: #61aeee; line-height: 26px;\">start<\/span><span style=\"line-height: 26px;\">()<\/span>\u00a0<\/span>{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">for<\/span>\u00a0(DebeziumEngine&lt;ChangeEvent&lt;String,\u00a0String&gt;&gt;\u00a0engine\u00a0:\u00a0engineList)\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0taskExecutor.execute(engine);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0}\n\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #61aeee; line-height: 26px;\">@PreDestroy<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\"><span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0<span style=\"color: #c678dd; line-height: 26px;\">void<\/span>\u00a0<span style=\"color: #61aeee; line-height: 26px;\">stop<\/span><span style=\"line-height: 26px;\">()<\/span>\u00a0<\/span>{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">for<\/span>\u00a0(DebeziumEngine&lt;ChangeEvent&lt;String,\u00a0String&gt;&gt;\u00a0engine\u00a0:\u00a0engineList)\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">if<\/span>\u00a0(engine\u00a0!=\u00a0<span style=\"color: #c678dd; line-height: 26px;\">null<\/span>)\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">try<\/span>\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0engine.close();\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\u00a0<span style=\"color: #c678dd; line-height: 26px;\">catch<\/span>\u00a0(IOException\u00a0e)\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0log.error(<span style=\"color: #98c379; line-height: 26px;\">\"\"<\/span>,\u00a0e);\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0}\n\n\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\"><span style=\"color: #c678dd; line-height: 26px;\">public<\/span>\u00a0<span style=\"color: #c678dd; line-height: 26px;\">static<\/span>\u00a0Map&lt;String,\u00a0Object&gt;\u00a0<span style=\"color: #61aeee; line-height: 26px;\">getPayload<\/span><span style=\"line-height: 26px;\">(String\u00a0value)<\/span>\u00a0<\/span>{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Map&lt;String,\u00a0Object&gt;\u00a0map\u00a0=\u00a0JSON.parseObject(value,\u00a0Map<span style=\"line-height: 26px;\">.<span style=\"color: #c678dd; line-height: 26px;\">class<\/span>)<\/span>;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Map&lt;String,\u00a0Object&gt;\u00a0payload\u00a0=\u00a0JSON.parseObject(JSON.toJSONString(map.get(<span style=\"color: #98c379; line-height: 26px;\">\"payload\"<\/span>)),\u00a0Map<span style=\"line-height: 26px;\">.<span style=\"color: #c678dd; line-height: 26px;\">class<\/span>)<\/span>;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">return<\/span>\u00a0payload;\n\u00a0\u00a0\u00a0\u00a0}\n\n\u00a0\u00a0\u00a0\u00a0<span style=\"line-height: 26px;\"><span style=\"color: #c678dd; line-height: 26px;\">public<\/span>\u00a0<span style=\"color: #c678dd; line-height: 26px;\">static<\/span>\u00a0ChangeData\u00a0<span style=\"color: #61aeee; line-height: 26px;\">getChangeData<\/span><span style=\"line-height: 26px;\">(Map&lt;String,\u00a0Object&gt;\u00a0payload)<\/span>\u00a0<\/span>{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Map&lt;String,\u00a0Object&gt;\u00a0source\u00a0=\u00a0JSON.parseObject(JSON.toJSONString(payload.get(<span style=\"color: #98c379; line-height: 26px;\">\"source\"<\/span>)),\u00a0Map<span style=\"line-height: 26px;\">.<span style=\"color: #c678dd; line-height: 26px;\">class<\/span>)<\/span>;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">return<\/span>\u00a0ChangeData.builder()\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.op(payload.get(<span style=\"color: #98c379; line-height: 26px;\">\"op\"<\/span>).toString())\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.table(source.get(<span style=\"color: #98c379; line-height: 26px;\">\"table\"<\/span>).toString())\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.after(JSON.parseObject(JSON.toJSONString(payload.get(<span style=\"color: #98c379; line-height: 26px;\">\"after\"<\/span>)),\u00a0Map<span style=\"line-height: 26px;\">.<span style=\"color: #c678dd; line-height: 26px;\">class<\/span>))\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">source<\/span>(<span style=\"color: #e6c07b; line-height: 26px;\">JSON<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">parseObject<\/span>(<span style=\"color: #e6c07b; line-height: 26px;\">JSON<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">toJSONString<\/span>(<span style=\"color: #e6c07b; line-height: 26px;\">payload<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">get<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">source<\/span>\")),\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">Map<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">class<\/span>))\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">before<\/span>(<span style=\"color: #e6c07b; line-height: 26px;\">JSON<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">parseObject<\/span>(<span style=\"color: #e6c07b; line-height: 26px;\">JSON<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">toJSONString<\/span>(<span style=\"color: #e6c07b; line-height: 26px;\">payload<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">get<\/span>(\"<span style=\"color: #e6c07b; line-height: 26px;\">before<\/span>\")),\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">Map<\/span>.<span style=\"color: #e6c07b; line-height: 26px;\">class<\/span>))\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.<span style=\"color: #e6c07b; line-height: 26px;\">build<\/span>()<\/span>;\n\u00a0\u00a0\u00a0\u00a0}\n\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #61aeee; line-height: 26px;\">@Data<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #61aeee; line-height: 26px;\">@Builder<\/span>\n\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">public<\/span>\u00a0<span style=\"color: #c678dd; line-height: 26px;\">static<\/span>\u00a0<span style=\"line-height: 26px;\"><span style=\"color: #c678dd; line-height: 26px;\">class<\/span>\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">ChangeData<\/span>\u00a0<\/span>{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #5c6370; font-style: italic; line-height: 26px;\">\/**\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0*\u00a0\u66f4\u6539\u524d\u6570\u636e\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0*\/<\/span>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0Map&lt;String,\u00a0Object&gt;\u00a0after;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0Map&lt;String,\u00a0Object&gt;\u00a0source;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #5c6370; font-style: italic; line-height: 26px;\">\/**\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0*\u00a0\u66f4\u6539\u540e\u6570\u636e\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0*\/<\/span>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0Map&lt;String,\u00a0Object&gt;\u00a0before;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #5c6370; font-style: italic; line-height: 26px;\">\/**\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0*\u00a0\u66f4\u6539\u7684\u8868\u540d\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0*\/<\/span>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0String\u00a0table;\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #5c6370; font-style: italic; line-height: 26px;\">\/**\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0*\u00a0\u64cd\u4f5c\u7c7b\u578b,\u00a0\u679a\u4e3e\u00a0Envelope.Operation\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0*\/<\/span>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #c678dd; line-height: 26px;\">private<\/span>\u00a0String\u00a0op;\n\u00a0\u00a0\u00a0\u00a0}\n\n}\n<\/code><\/pre>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u5c06\u76d1\u542c\u5230\u7684binlog\u65e5\u5fd7\u5c01\u88c5\u4e3aChangeData\u5bf9\u8c61\uff0c\u5305\u62ec\u8868\u540d\uff0c\u66f4\u6539\u524d\u540e\u7684\u6570\u636e<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u4ee5\u53ca\u64cd\u4f5c\u7c7b\u578b<\/span><\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"overflow-x: auto; padding: 16px; color: #abb2bf; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #282c34; border-radius: 5px;\">READ(<span style=\"color: #98c379; line-height: 26px;\">\"r\"<\/span>),\nCREATE(<span style=\"color: #98c379; line-height: 26px;\">\"c\"<\/span>),\nUPDATE(<span style=\"color: #98c379; line-height: 26px;\">\"u\"<\/span>),\nDELETE(<span style=\"color: #98c379; line-height: 26px;\">\"d\"<\/span>),\nTRUNCATE(<span style=\"color: #98c379; line-height: 26px;\">\"t\"<\/span>);\n<\/code><\/pre>\n<h3 style=\"margin-top: 30px; margin-bottom: 15px; color: #333333; font-size: 1.2em;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 18px;\"><strong>\u6d4b\u8bd5<\/strong><\/span><\/h3>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">update\u64cd\u4f5c\u8f93\u51fa<\/span><\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"overflow-x: auto; padding: 16px; color: #abb2bf; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #282c34; border-radius: 5px;\">MysqlListener.ChangeData(after\u00a0=\u00a0{\n\u00a0name\u00a0=\u00a0Suzuki\u00a0Mio2,\n\u00a0id\u00a0=\u00a01\n},\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">source<\/span>\u00a0=\u00a0{\n\u00a0file\u00a0=\u00a0binlog\u00a0.000013,\n\u00a0connector\u00a0=\u00a0mysql,\n\u00a0pos\u00a0=\u00a042587833,\n\u00a0name\u00a0=\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">test<\/span>\u00a0-\u00a01,\n\u00a0row\u00a0=\u00a00,\n\u00a0server_id\u00a0=\u00a01,\n\u00a0version\u00a0=\u00a01.7\u00a0.0.Final,\n\u00a0ts_ms\u00a0=\u00a01691458956000,\n\u00a0snapshot\u00a0=\u00a0<span style=\"color: #56b6c2; line-height: 26px;\">false<\/span>,\n\u00a0db\u00a0=\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">test<\/span>\n\u00a0table\u00a0=\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">test<\/span>\n},\u00a0before\u00a0=\u00a0{\n\u00a0name\u00a0=\u00a0Suzuki\u00a0Mio,\n\u00a0id\u00a0=\u00a01\n},\u00a0table\u00a0=\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">test<\/span>,\u00a0op\u00a0=\u00a0u)\ndata\u00a0=\u00a0{\n\u00a0name\u00a0=\u00a0Suzuki\u00a0Mio2,\n\u00a0id\u00a0=\u00a01\n}\n<\/code><\/pre>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u65b0\u589e\u64cd\u4f5c\u8f93\u51fa<\/span><\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"overflow-x: auto; padding: 16px; color: #abb2bf; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #282c34; border-radius: 5px;\">MysqlListener.ChangeData(after\u00a0=\u00a0{\n\u00a0name\u00a0=\u00a0\u738b\u4e94,\n\u00a0id\u00a0=\u00a00\n},\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">source<\/span>\u00a0=\u00a0{\n\u00a0file\u00a0=\u00a0binlog\u00a0.000013,\n\u00a0connector\u00a0=\u00a0mysql,\n\u00a0pos\u00a0=\u00a042588175,\n\u00a0name\u00a0=\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">test<\/span>\u00a0-\u00a01,\n\u00a0row\u00a0=\u00a00,\n\u00a0server_id\u00a0=\u00a01,\n\u00a0version\u00a0=\u00a01.7\u00a0.0.Final,\n\u00a0ts_ms\u00a0=\u00a01691459066000,\n\u00a0snapshot\u00a0=\u00a0<span style=\"color: #56b6c2; line-height: 26px;\">false<\/span>,\n\u00a0db\u00a0=\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">test<\/span>,\n\u00a0table\u00a0=\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">test<\/span>\n},\u00a0before\u00a0=\u00a0null,\u00a0table\u00a0=\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">test<\/span>,\u00a0op\u00a0=\u00a0c)\n<\/code><\/pre>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u5220\u9664\u64cd\u4f5c\u8f93\u51fa<\/span><\/p>\n<pre style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"overflow-x: auto; padding: 16px; color: #abb2bf; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #282c34; border-radius: 5px;\">MysqlListener.ChangeData(after\u00a0=\u00a0null,\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">source<\/span>\u00a0=\u00a0{\n\u00a0file\u00a0=\u00a0binlog\u00a0.000013,\n\u00a0connector\u00a0=\u00a0mysql,\n\u00a0pos\u00a0=\u00a042588959,\n\u00a0name\u00a0=\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">test<\/span>\u00a0-\u00a01,\n\u00a0row\u00a0=\u00a00,\n\u00a0server_id\u00a0=\u00a01,\n\u00a0version\u00a0=\u00a01.7\u00a0.0.Final,\n\u00a0ts_ms\u00a0=\u00a01691459104000,\n\u00a0snapshot\u00a0=\u00a0<span style=\"color: #56b6c2; line-height: 26px;\">false<\/span>,\n\u00a0db\u00a0=\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">test<\/span>\n\u00a0table\u00a0=\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">test<\/span>\n},\u00a0before\u00a0=\u00a0{\n\u00a0name\u00a0=\u00a0\u738b\u4e94,\n\u00a0id\u00a0=\u00a00\n},\u00a0table\u00a0=\u00a0<span style=\"color: #e6c07b; line-height: 26px;\">test<\/span>,\u00a0op\u00a0=\u00a0d)\n<\/code><\/pre>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u6211\u4eec\u4e4b\u524d\u914d\u7f6e\u7684\u4fdd\u5b58\u8bfb\u53d6\u8fdb\u5ea6\u7684\u6587\u4ef6storageFile\uff0c\u7c7b\u4f3c\u4e8ekafka\u7684\u504f\u79fb\u91cf\uff0c\u8bb0\u5f55\u7684\u5185\u5bb9\u5982\u4e0b\uff1a<\/span><\/p>\n<p><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.0811764705882353\" data-data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-54\/2023083014195434342c0b7.png?wx_fmt=other\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"other\" data-w=\"850\" \/><noscript><img class=\"rich_pages wxw-img\" data-ratio=\"0.0811764705882353\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-54\/2023083014195434342c0b7.png?wx_fmt=other\" data-type=\"other\" data-w=\"850\" \/><\/noscript><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u505c\u6b62\u670d\u52a1\uff0c\u5bf9\u6570\u636e\u5e93\u8fdb\u884c\u64cd\u4f5c\uff0c\u518d\u6b21\u91cd\u542f\uff0c\u4f1a\u6839\u636e\u8fdb\u5ea6\u91cd\u65b0\u8bfb\u53d6\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px; color: rgba(0, 0, 0, 0.9); letter-spacing: 0.034em;\">\u00a0<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong><span style=\"color: rgba(0, 0, 0, 0.9); letter-spacing: 0.034em; font-size: 20px;\">\u5c0f\u7ed3<\/span><\/strong><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u672c\u6587\u4ecb\u7ecd\u4e86debezium\uff0c\u66f4\u591a\u7684\u65f6\u5019\uff0c\u6211\u4eec\u4e00\u8c08\u5230CDC\uff0c\u7b2c\u4e00\u60f3\u5230\u7684\u662f\u5927\u91cf\u6570\u636e\u540c\u6b65\u7684\u5de5\u5177\u3002\u4f46\u5176\u5b9e\u4e5f\u53ef\u4ee5\u5229\u7528\u5176\u6570\u636e\u53d8\u66f4\u6355\u83b7\u7684\u7279\u6027\uff0c\u6765\u8fbe\u5230\u4e00\u90e8\u4efd\u6d88\u606f\u961f\u5217\u7684\u4f5c\u7528\u3002\u4f46\u5176\u6bd5\u7adf\u4e0d\u80fd\u5b8c\u5168\u66ff\u4ee3\u6d88\u606f\u961f\u5217\u3002<\/span><\/p>\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: #666666;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 16px;\">\u5927\u5bb6\u7406\u6027\u770b\u5f85\u4e0e\u9009\u62e9\u3002\u672c\u6587\u7684\u91cd\u70b9\u5728\u4ecb\u7ecd\u4e00\u79cd\u601d\u8def\uff0c\u5177\u4f53\u7684\u67d0\u9879\u6280\u672f\u53cd\u800c\u4e0d\u90a3\u4e48\u91cd\u8981\u3002<\/span><\/p>\n<\/section>\n<p style=\"display: none;\">\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4f5c\u8005\uff1a\u7a0b\u5e8f\u5458\u8ffd\u98ce \u7a0b\u5e8f\u5458\u8ffd\u98ce \u5fae\u4fe1\u53f7 gh_431f6fdffcb1 \u529f\u80fd\u4ecb\u7ecd \u4e13\u6ce8\u4e8e\u5206\u4eabJava\u5404\u7c7b\u5b66\u4e60\u7b14\u8bb0\u3001\u9762\u8bd5\u9898\u4ee5\u53caIT\u7c7b\u8d44\u8baf\u3002 \u53d1\u8868\u4e8e<br \/>\n\u8f6c\u8f7d\u5730\u5740\uff1ahttps:\/\/mp.weixin.qq.com\/s\/faJOAJ7tODik0N6Pn7IgWg<\/p>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\uff1ajuejin.cn\/post\/7264791359839223823 \u00a0 \u5965\u5361\u59c6\u5243\u5200\u539f\u7406\uff0c\u201c\u5982\u65e0\u5fc5\u8981\uff0c\u52ff\u589e\u5b9e\u4f53&#8221;\u3002 \u5728\u4e00\u4e9b\u5c0f &#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-3087","post","type-post","status-publish","format-standard","hentry","category-spring-boot"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-51\/20230830141951d8d8749d8.png?wx_fmt=other","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-51\/20230830141951d8d8749d8.png?wx_fmt=other","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-51\/20230830141951d8d8749d8.png?wx_fmt=other","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-51\/20230830141951d8d8749d8.png?wx_fmt=other","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-51\/20230830141951d8d8749d8.png?wx_fmt=other","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-51\/20230830141951d8d8749d8.png?wx_fmt=other","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-51\/20230830141951d8d8749d8.png?wx_fmt=other","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-51\/20230830141951d8d8749d8.png?wx_fmt=other","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-51\/20230830141951d8d8749d8.png?wx_fmt=other","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-51\/20230830141951d8d8749d8.png?wx_fmt=other","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-52\/202308301419527474632aa.png?wx_fmt=other","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-52\/202308301419527474632aa.png?wx_fmt=other","id":"image3"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-53\/20230830141953d3d3cead3.png?wx_fmt=other","id":"image4"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-53\/20230830141953d3d3cead3.png?wx_fmt=other","id":"image5"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-53\/2023083014195328283ed9d.png?wx_fmt=other","id":"image6"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-53\/2023083014195328283ed9d.png?wx_fmt=other","id":"image7"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-54\/2023083014195434342c0b7.png?wx_fmt=other","id":"image8"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-08-30\/14-19-54\/2023083014195434342c0b7.png?wx_fmt=other","id":"image9"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Spring Boot","post_date":"2023-08-31","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":848,"next_post_id":3140,"next_post_title":"Java\u5b9e\u73b0\u6dfb\u52a0\u6587\u5b57\u6c34\u5370\u3001\u56fe\u7247\u6c34\u5370\u529f\u80fd\u5b9e\u6218","previous_post_id":3093,"previous_post_title":"Java\u9879\u76ee\u9632\u6b62SQL\u6ce8\u5165\u7684\u56db\u79cd\u65b9\u6848","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/3087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=3087"}],"version-history":[{"count":1,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/3087\/revisions"}],"predecessor-version":[{"id":3110,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/3087\/revisions\/3110"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=3087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=3087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=3087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}