My tables:
- users
- clients
- notifications
- alerts
By default I want information to go to topic user_service.$tableName
but for specific tables, I want the information in different tables.
Expected Output
- users => user_service.users
- clients => user_service.clients
- notifications => notification_service.notifications
- alerts => alert_service.alerts
I have the configuration that is working for one table like notifications but not sure how I can adjust if for multiple tables
Existing Config:
"transforms": "unwrap,Reroute",
"transforms.Reroute.type": "io.debezium.transforms.ByLogicalTableRouter",
"transforms.Reroute.topic.regex": "(.*)notifications",
"transforms.Reroute.topic.replacement": "notificaton_service.notifications",
CodePudding user response:
Got it working with
"transforms": "unwrap,Reroute",
"transforms.Reroute.type": "io.debezium.transforms.ByLogicalTableRouter",
"transforms.Reroute.topic.regex": "(.*)(notifications|alerts)",
"transforms.Reroute.topic.replacement": "$2_service.$2",