From 4af0ae8a36e3a792249e66d74dfd6c9412ef5be9 Mon Sep 17 00:00:00 2001 From: Aolin Date: Tue, 18 Jul 2023 16:14:16 +0800 Subject: [PATCH] cdc matcher rule explaination example (#14280) --- ticdc/ticdc-sink-to-kafka.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ticdc/ticdc-sink-to-kafka.md b/ticdc/ticdc-sink-to-kafka.md index 8e6533bbd8bae..e1b4b2399a262 100644 --- a/ticdc/ticdc-sink-to-kafka.md +++ b/ticdc/ticdc-sink-to-kafka.md @@ -161,7 +161,17 @@ For detailed integration guide, see [Quick Start Guide on Integrating TiDB with ### Matcher rules -In the example of the previous section: +Take the following configuration of `dispatchers` as an example: + +```toml +[sink] +dispatchers = [ + {matcher = ['test1.*', 'test2.*'], topic = "Topic expression 1", partition = "ts" }, + {matcher = ['test3.*', 'test4.*'], topic = "Topic expression 2", partition = "index-value" }, + {matcher = ['test1.*', 'test5.*'], topic = "Topic expression 3", partition = "table"}, + {matcher = ['test6.*'], partition = "ts"} +] +``` - For the tables that match the matcher rule, they are dispatched according to the policy specified by the corresponding topic expression. For example, the `test3.aa` table is dispatched according to "Topic expression 2"; the `test5.aa` table is dispatched according to "Topic expression 3". - For a table that matches multiple matcher rules, it is dispatched according to the first matching topic expression. For example, the `test1.aa` table is distributed according to "Topic expression 1".