使用 Kafka Connect S3 Sink 时从 S3 路径中删除主题名称

Remove topic name from S3 paths when using Kafka Connect S3 Sink

使用https://docs.confluent.io/current/connect/kafka-connect-s3/index.html

我如何设置连接器以使 Kafka 主题名称不包含在输出 S3 路径中?

我正在使用 TimeBasedPartitioner,我希望在路径中使用固定名称而不是主题名称。所以这个:

fixed_name/<encodedPartition>/<topic>+<kafkaPartition>+<startOffset>.<format>

而不是默认值:

topics/<topic>/<encodedPartition>/<topic>+<kafkaPartition>+<startOffset>.<format>

谢谢!

您不能删除主题名称,除非您自己编写 Partitioner 并覆盖 generatePartitionedPath