I want to make a flow from a Kafka cluster/topic in thr prod cluster into another Kafka cluster in the dev environment for scalability and regrrssion testing.
For the duck-tape solution, I cascade a Kafka consumer and producer, but my instinct tells me that there should be a better way. But, I couldn't find any good solution yet. Can anyone help me?
Click on a source topic, select target topic, and click “Start Copying” button. That's it. Kafka Magic will try copying up to 'Max Results' messages from source to target using default schema assignments for the topics.
The process of replicating data between Kafka clusters is called "mirroring", to differentiate cross-cluster replication from replication among nodes within a single cluster. A common use for mirroring is to maintain a separate copy of a Kafka cluster in another data center.
Topic Replication is the process to offer fail-over capability for a topic. Replication factor defines the number of copies of a topic in a Kafka cluster. Replication factor can be defined at topic level.
Yes, Kafka's design allows consumers from one consumer group to consume messages from multiple topics. The protocol underlying consumer.
If you want to replicate data from one cluster to another then there is one kafka tool called MirrorMaker
.
Kafka comes with a tool for mirroring data between Kafka clusters. The tool reads from a source cluster and writes to a destination cluster. Data will be read from topics in the source cluster and written to a topic with the same name in the destination cluster.
Here is syntax to run MirrorMaker
tool:
bin/kafka-run-class.sh kafka.tools.MirrorMaker
--consumer.config consumer.properties
--producer.config producer.properties --whitelist my-topic
You can find this script in kafka installation directory. Here you need to provide consumer.properties
of your source cluster
and producer.properties
of your destination cluster
. You can whitelist which topics should be mirrored through --whitelist
option.
You can find more information about Mirroring data between clusters
Note: MirrorMaker copies data into same topic_name
in destination cluster
as source cluster
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With