[ 
https://issues.apache.org/jira/browse/KAFKA-3841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15330827#comment-15330827
 ] 

James Cheng commented on KAFKA-3841:
------------------------------------

We have a similar use case. Mirrormaker has a config option called 
message.handler that lets you modify the message as mirrormaker produces it to 
the new cluster. See the docs here:

https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/tools/MirrorMaker.scala#L142-L152

We are using that functionality to change the topic name. See 
https://github.com/gwenshap/kafka-examples/blob/master/MirrorMakerHandler/src/main/java/com/shapira/examples/TopicSwitchingHandler.java
 for an example.





> MirrorMaker topic renaming
> --------------------------
>
>                 Key: KAFKA-3841
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3841
>             Project: Kafka
>          Issue Type: New Feature
>          Components: tools
>    Affects Versions: 0.10.0.0
>            Reporter: Ning Zhang
>
> Our organization (walmart.com) has been a Kafka user since some years back 
> and MirrorMaker has been a convenient tool to bring our Kafka data from one 
> Kafka cluster to another cluster.
> In many our use cases, the mirrored topic from the source cluster may not 
> want to have the same name in the target cluster. This could be a valid 
> scenario when the same topic name already exists on the target cluster, or we 
> want to append the name of the data center to the topic name in the target 
> cluster, such as "grocery_items_mirror_sunnyvale", to explicitly identify the 
> source (e.g. sunnyvale) and nature (e.g. mirroring) of the topic.
> We have implemented the MirrorMaker topic renaming feature internally which 
> has been used for production over a couple of years. While keeping our 
> internal Kafka fork with the above "renaming" branch across version upgrade 
> does not cost us too much labor, we think it may be meaningful to contribute 
> back to the community so that potentially many people may have the similar 
> expectation and could benefit from this feature.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to