Configuring prefixless replication

By default, replication flows you deploy use the DefaultReplicationPolicy, which prefixes the replicated topic names in the target Kafka cluster. If you want replicated topics to retain their original name, you configure your replication flow to use IdentityReplicationPolicy instead.

You configure replications flows to use the IdentityReplicationPolicy with the replication.policy.class connector property. This property specifies the class name of the replication policy to use. You add the property to the configuration of the replication connectors that you deploy for each replication flow. That is, you need to add the property to the configuration of MirrorSourceConnector, MirrorHeartBeatConnector, and MirrorCheckpointConnector.

The value of this property must be set to the same replication policy in each connector instance that is deployed for a replication flow.

Instead of hardcoding the replication policy in each connector configuration, Cloudera recommends that you add the value to a ConfigMap that stores properties that are common to the connectors, and load the value using the KubernetesConfigMapConfigProvider.

#...
kind: KafkaConnector
spec:
  class: org.apache.kafka.connect.mirror.MirrorHeartbeatConnector
  config:
    replication.policy.class: ${cfmap:[***REPLICATION NS***]/[***REPLICATION CONFIGMAP***]:replication.policy.class}

A configuration setup like this enables you to specify the replication policy centrally.