# MirrorMaker2 High Availability

**URL:** <https://forum.confluent.io/t/mirrormaker2-high-availability/37312>\
**Category:** Kafka Connect\
**Created:** [24 February 2025 08:56 UTC](https://forum.confluent.io/t/mirrormaker2-high-availability/37312 "2025-02-24T08:56:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cumba90](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/cumba90/32/4947_2.png) [@cumba90](https://forum.confluent.io/u/cumba90)\
**Post date:** [24 February 2025 08:56 UTC](https://forum.confluent.io/t/mirrormaker2-high-availability/37312/1 "2025-02-24T08:56:34Z")

</div>

How are high availability and fault tolerance organized in MM2 ? Does it possible to run multiple instances of MM2 in Kafka connect to replicate same topic that would be created in different host ? My expectations if one worker goes down MM2 will continue replicating data using other workers.

I tried to create 3 instances of MM2 Connector to replicate one topic and specified same consumer group in parameter “consumer.group.id” but i’ve got duplicates in destination topic equals to number of MM2 Connector instances.

---

<div class="post-metadata">

**Author:** ![cumba90](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/cumba90/32/4947_2.png) [@cumba90](https://forum.confluent.io/u/cumba90)\
**Post date:** [27 February 2025 10:16 UTC](https://forum.confluent.io/t/mirrormaker2-high-availability/37312/2 "2025-02-27T10:16:39Z")

</div>

Do you have any tips related to the topic ?

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [27 February 2025 11:57 UTC](https://forum.confluent.io/t/mirrormaker2-high-availability/37312/3 "2025-02-27T11:57:01Z")

</div>

I assume you’ve created 3 standalone instances?

could you share how you’ve started the stack?

best,  
michael

---

<div class="post-metadata">

**Author:** ![cumba90](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/cumba90/32/4947_2.png) [@cumba90](https://forum.confluent.io/u/cumba90)\
**Post date:** [28 February 2025 11:48 UTC](https://forum.confluent.io/t/mirrormaker2-high-availability/37312/4 "2025-02-28T11:48:37Z")

</div>

I use this configuration to define MM2 connector workers on target side but with different “name” like my-mm2-conn-1, my-mm2-conn-2, my-mm2-conn-3

> {  
> “name”: “my-mm2-conn-1”,  
> “config”: {  
> “consumer.group.id”: “mm2-group”,  
> “consumer.group.instance.id”: “mm2-grp-inst”,  
> “consumer.client.id”: “single-to-cluster-consumer”,  
> “connector.class”: “org.apache.kafka.connect.mirror.MirrorSourceConnector”,  
> “tasks.max”: “3”,  
> “source.cluster.alias”: “from\_single”,  
> “target.cluster.alias”: “to\_cluster”,  
> “target.cluster.bootstrap.servers”: “cluster-1:9092,cluster-2:9092,cluster-3:9092”,  
> “source.cluster.bootstrap.servers”: “single:9092”,  
> “topics”: “topic-a”,  
> “sync.topic.configs.enabled”: “false”,  
> “emit.heartbeats.enabled”: “true”,  
> “emit.checkpoints.enabled”: “true”,  
> “sync.group.offsets.enabled”: “true”,  
> “replication.factor”: “3”,  
> “heartbeats.topic.replication.factor”: “1”,  
> “checkpoints.topic.replication.factor”: “1”,  
> “offset-syncs.topic.replication.factor”: “1”  
> }  
> }

Then I create the connector using REST API

> curl -X POST -H ‘Content-Type: application/json’ cluster-1:8083/connectors --data-binary @/data/home/user/my-mm2-conn.json

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [28 February 2025 15:48 UTC](https://forum.confluent.io/t/mirrormaker2-high-availability/37312/5 "2025-02-28T15:48:32Z")

</div>

you don’t need to start 3 connectors for the same topic  
(this is were you’re duplicates come from)  
one connector should be sufficient and connect framework should take care of task failover etc

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [30 March 2025 15:49 UTC](https://forum.confluent.io/t/mirrormaker2-high-availability/37312/6 "2025-03-30T15:49:20Z")

</div>

Closed on 30 March 2025 15:49 UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
