My tables:
用户- 客户
- <
- 警报/gh>
默认情况下,我希望信息转到主题user_service.$tableName
,但对于特定的表,我希望信息在不同的表中。
- 用户=比;user_service.users
- 客户=比;user_service.clients
- 通知=比;notification_service.notifications
- 警报=比;alert_service.alerts
我的配置是为一个表工作,如通知,但不确定如何调整如果为多个表
现有配置:
"transforms": "unwrap,Reroute",
"transforms.Reroute.type": "io.debezium.transforms.ByLogicalTableRouter",
"transforms.Reroute.topic.regex": "(.*)notifications",
"transforms.Reroute.topic.replacement": "notificaton_service.notifications",
使用
"transforms": "unwrap,Reroute",
"transforms.Reroute.type": "io.debezium.transforms.ByLogicalTableRouter",
"transforms.Reroute.topic.regex": "(.*)(notifications|alerts)",
"transforms.Reroute.topic.replacement": "$2_service.$2",