是否可以在 Debezium 中配置 table_name => kafka 主题映射?

Is it possible in Debezium to configure table_name => kafka topic mapping?

我读过 http://debezium.io/docs/connectors/mysql/ 但我找不到任何关于是否可以配置 debezium 的信息,以便可以将 2 个(或更多)table 的更改写入相同的单个卡夫卡主题?在我看来,它总是 1 table -> 1 个主题。

是,使用Single Message Transforms, per the link you identified. You can use regular expressions (regex) to map the tables to the topic required. Both io.debezium.transforms.ByLogicalTableRouter or org.apache.kafka.connect.transforms.RegexRouter should do the trick. There's an example of the latter in this post here

"transforms":"dropPrefix",  
"transforms.dropPrefix.type":"org.apache.kafka.connect.transforms.RegexRouter",  
"transforms.dropPrefix.regex":"DC1-TEST-(.*)",  
"transforms.dropPrefix.replacement":""