Skip to content

Commit

Permalink
cdc matcher rule explaination example (pingcap#14280)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oreoxmt committed Jul 18, 2023
1 parent 1e0ea56 commit 4af0ae8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ticdc/ticdc-sink-to-kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down

0 comments on commit 4af0ae8

Please sign in to comment.