New blog: πŸŽ„ Twelve Days of SMT πŸŽ„ - Day 4: RegExRouter

If you want to change the topic name to which a source connector writes, or object name that’s created on a target by a sink connector, the RegExRouter is exactly what you need.

To use the Single Message Transform you specify the pattern in the topic name to match, and its replacement. To drop a prefix of test- from a topic you would use:

" transforms " : " dropTopicPrefix " ,

" transforms.dropTopicPrefix.type " : " org.apache.kafka.connect.transforms.RegexRouter " ,

" transforms.dropTopicPrefix.regex " : " test-(.*) " ,

" transforms.dropTopicPrefix.replacement " : " $1 "


Read more: πŸŽ„ Twelve Days of SMT πŸŽ„ - Day 4: RegExRouter