Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to Kafka topic clone.

avatar
Expert Contributor

Can we clone single Kafka topic? If yes then how?

1 ACCEPTED SOLUTION

avatar
Expert Contributor

Thank you for sharing the URL. I am looking for topic cloning within the same cluster. Can we do this.

View solution in original post

3 REPLIES 3

avatar
Super Collaborator

At the basics, you would write a producer that consumes from one topic and produces to another.

MirrorMaker is what you are looking for.

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.2/bk_kafka-component-guide/content/ch_kafka_m...

avatar
Expert Contributor

Thank you for sharing the URL. I am looking for topic cloning within the same cluster. Can we do this.

avatar
Super Collaborator

Yes, MirrorMaker is not putting a limitation on remote vs local cluster. It is designed for remote clusters because there is almost no need to do it locally. If you are mirroring a topic locally, you must rename it, and if you are going to rename it, then you have consumers/producers using data in both topics?

You are replicating data within the same cluster for little gain while your consumers/producers can easily be configured to use the correct topic(s).