Error in Configuring TiCDC to Distribute Different Tables to Different Kafka Topics

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: ticdc 配置不同表分发到不同kafka主题报错

| username: juecong

When starting TiCDC listening, a config parameter was added for distributing different topics. If there is no topic parameter in the configuration, it works fine. However, if a topic is added, an error occurs. The following configurations all result in errors:

[sink]
dispatchers = [
{matcher = ['!jsk_data.jsk_ads_count*'], topic = "tidb-to-kafka-full", partition = "ts" },
{matcher = ['jsk_data.jsk_ads_count_*'], topic = "ads_count_data", partition = "ts" }
]

[[sink.dispatchers]]
matcher = ['!jsk_data.jsk_ads_count_*']
dispatcher = 'ts'
topic = "tidb-to-kafka-full"

TiDB cluster version: v6.1.0

Command used:

tiup cdc cli changefeed create --pd=http://192.168.60.4:2379 --sink-uri="kafka://192.168.60.207:9092/tidb-to-kafka-full?protocol=canal-json&kafka-version=3.2.0&partition-num=4&max-message-bytes=1048588&replication-factor=1&auto-create-topic=false" --changefeed-id="tidb-to-kafka-full" --sort-engine="unified" --config /home/sync-tidb-to-kafka.toml

| username: xinyuzhao | Original post link

Your topic distribution rules are illegal. For details, please refer to https://docs.pingcap.com/zh/tidb/stable/manage-ticdc#topic-分发器

| username: juecong | Original post link

Thank you, it has been resolved.

| username: system | Original post link

This topic was automatically closed 1 minute after the last reply. No new replies are allowed.