Set up an Apache Kafka® MirrorMaker 2 replication flow
Apache Kafka® MirrorMaker 2 replication flows sync topics from a source Apache Kafka® cluster to a target Apache Kafka® cluster. You can define replication flows for Aiven for Apache Kafka services or external Apache Kafka clusters.
To define a replication flow between a source Apache Kafka cluster and a target cluster:
-
Log in to the Aiven Console and click the Aiven for Apache Kafka MirrorMaker 2 service to define the replication flow.
note -
Click Integrations.
-
Add the source Apache Kafka cluster:
- On the Integrations page, click Cluster for replication.
- Click Existing service or New service.
- Click the Apache Kafka service to use as the source cluster.
- Click Continue.
- Add or confirm the cluster alias.
-
Repeat the integration steps for the target Apache Kafka cluster.
The cluster alias identifies the Kafka integration in MirrorMaker 2. Use the same aliases when you click Source Cluster and Target Cluster in the replication flow. If you do not set an alias, Aiven generates one from the project and service name.
-
Click Replication flows.
-
Click Create replication flow.
-
On the Create new replication flow screen, configure the flow:
- In Source Cluster, click the source Kafka integration alias.
- In Target Cluster, click the target Kafka integration alias.
- In Topics, enter the topics to replicate. To replicate all topics, click All topics.
- In Topic blacklist, enter the topics to exclude. To exclude internal topics, click Internal topics.
- Configure offset sync, delivery, and replication policy options as needed. For new replications, enable message delivery exactly once if it is available for your setup.
- Use Enable to create the flow as active or inactive.
-
Click Create.
-
In the target Apache Kafka cluster, verify the replicated topics.
With the default replication policy, replicated topic names use the
source-cluster-alias.source-topic-nameformat. If you use the identity replication policy, topic names stay unchanged.