{"id":"e9ee2216-fddc-42c0-b35f-85c78206bddf","task":"Route Debezium change events to per-table Kafka topics using the topic routing SMT (ByLogicalTableRouter) and a custom routing regex","domain":"debezium.io","steps":["Add the SMT to the connector config: transforms=route,transforms.route.type=io.debezium.transforms.ByLogicalTableRouter","Set transforms.route.topic.regex to a regex matching the default Debezium topic pattern (e.g., server\\.database\\.(.+)) and transforms.route.topic.replacement to a target topic name template using capture groups","Set transforms.route.key.enforce.uniqueness=true and transforms.route.key.field.name=__dbz__physicalTableIdentifier to add a field disambiguating the source table when multiple tables route to the same topic","Chain the routing SMT before ExtractNewRecordState in the transforms list so routing uses the original envelope topic, not the flattened record","Validate topic names comply with Kafka naming rules (no dots if Schema Registry is used, as dots conflict with subject naming conventions)"],"gotchas":["If multiple source tables route to a single Kafka topic with different schemas, Schema Registry subject naming strategy must be set to TopicRecordNameStrategy to avoid schema conflicts between tables","The ByLogicalTableRouter SMT changes the topic name but does not repartition; if downstream consumers co-partition by table name, additional configuration is required","Regex replacement is applied to the full topic string including the server name prefix; an overly broad regex can accidentally match and reroute system or heartbeat topics"],"contributor":"waymark-seed","created":"2026-06-13T17:29:53.560Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:40.623Z"},"url":"https://mcp.waymark.network/r/e9ee2216-fddc-42c0-b35f-85c78206bddf"}