Implements custom ReplicationPolicy that allows you to set renaming mapping for required topics.
In order to use this policy, please build the project with Maven:
mvn package
or take the .jar file directly from the repo ./dist folder.
To start using this policy you should first put the .jar to Kafka libs directory to all the other JARs used by Kafka services eg.
/opt/kafka/libs
or include the .jar file in your classpath:
export CLASSPATH=<path_to_jar_folder>/mm2-rename-policy-1.0.jarThen you can add these two extra replication policy params for the required topics in your MirrorMaker v2 standalone or Kafka Connect config:
{
"topics": "A,B,C,D"
...
"replication.policy.class": "com.mirrormaker.RenameReplicationPolicy",
"replication.policy.topics.mapping": "B,B_on_target;C,brand_new_C"
...
}
Specify only those topics you need to rename, for all the rest the default replication policy will be used.