It seems like it's not possible to use the RegexRoute to replace all the dots in a topic name with underscores since RegexRouter calls replaceFirst
not replaceAll
. Is there a way around this? One thought I had was to take multiple passes with transform:
{
"connector.class": "io.confluent.connect.s3.S3SinkConnector",
"tasks.max": "10",
"topics": "foo.bar.baz,some.topic",
"s3.region": "us-east-1",
"s3.bucket.name": "bucket",
"s3.part.size": "5242880",
"s3.compression.type": "gzip",
"timezone": "UTC",
"rotate.schedule.interval.ms": "900000",
"flush.size": "1000000",
"storage.class": "io.confluent.connect.s3.storage.S3Storage",
"format.class": "io.confluent.connect.s3.format.bytearray.ByteArrayFormat",
"partitioner.class": "io.confluent.connect.storage.partitioner.TimeBasedPartitioner",
"path.format": "'year'=YYYY/'month'=MM/'day'=dd/'hour'=HH",
"timestamp.extractor": "RecordField",
"timestamp.field": "time",
"schema.compatibility": "NONE",
"name": "s3-sink",
"transforms":"replaceFirstDot,replaceSecondDot",
"transforms.replaceFirstDot.type": "org.apache.kafka.connect.transforms.RegexRouter",
"transforms.replaceFirstDot.regex": "\\.",
"transforms.replaceFirstDot.replacement": "_",
"transforms.replaceSecondDot.type": "org.apache.kafka.connect.transforms.RegexRouter",
"transforms.replaceSecondDot.regex": "\\.",
"transforms.replaceSecondDot.replacement": "_"
}
Is there an easy way to include a custom partitioner or transformation/router?