You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/hdinsight/kafka/apache-kafka-mirror-maker-2.md
+57-16Lines changed: 57 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,22 @@ description: Learn how to use Use MirrorMaker 2 to replicate Apache Kafka topics
4
4
ms.service: hdinsight
5
5
ms.topic: how-to
6
6
ms.custom: hdinsightactive
7
-
ms.date: 03/10/2023
7
+
ms.date: 04/28/2023
8
8
---
9
9
10
-
# Use MirrorMaker 2 to replicate Apache Kafka topics with Kafka on HDInsight
10
+
# Use MirrorMaker 2 to migrate HDInsight Kafka for different HDI (Azure HDInsight) versions
11
11
12
12
Learn how to use Apache Kafka's mirroring feature to replicate topics to a secondary cluster. You can run mirroring as a continuous process, or intermittently, to migrate data from one cluster to another.
13
13
14
14
In this article, you use mirroring to replicate topics between two HDInsight clusters. These clusters are in different virtual networks in different datacenters.
15
15
16
-
> [!WARNING]
17
-
> Don't use mirroring as a means to achieve fault-tolerance. The offset to items within a topic are different between the primary and secondary clusters, so clients can't use the two interchangeably. If you are concerned about fault tolerance, you should set replication for the topics within your cluster. For more information, see [Get started with Apache Kafka on HDInsight](apache-kafka-get-started.md).
16
+
> [!NOTE]
17
+
> We can use mirroring cluster as a fault tolerance.
18
+
> This is valid only is primary cluster HDI Kafka 2.4.1, 3.2.0 and secondary cluster is HDI Kafka 3.2.0 versions.
19
+
> Secondary cluster would work seamlessly if your primary cluster went down.
20
+
> Consumer group offsets will be automatically translated to secondary cluster.
21
+
> Just point your primary cluster consumers to secondary cluster with same consumer group and your consumer group will start consuming from the offset where it left in primary cluster.
22
+
> The only difference would be that the topic name in backup cluster will change from TOPIC_NAME to primary-cluster-name.TOPIC_NAME.
18
23
19
24
## How Apache Kafka mirroring works
20
25
@@ -73,10 +78,10 @@ This architecture features two clusters in different resource groups and virtual
73
78
74
79
1. Create two new Kafka clusters:
75
80
76
-
| Cluster name | Resource group | Virtual network | Storage account |
81
+
| Cluster name |HDInsight version| Resource group | Virtual network | Storage account |
> From now onwards we will use `primary-kafka-cluster` as `PRIMARYCLUSTER` and `secondary-kafka-cluster` as `SECONDARYCLUSTER`.
@@ -172,6 +177,23 @@ This architecture features two clusters in different resource groups and virtual
172
177
destination->source.enabled=true
173
178
destination->source.topics = .*
174
179
```
180
+
1. For automated consumer offset sync, we need to enable replication and control the sync duration too. Below property will sync offset every 30 second. For active-active scenario we need to do it both ways
0 commit comments