What is Kafka MirrorMaker 2?
Answer
MirrorMaker 2 (MM2) is Kafka's built-in cluster replication tool for mirroring topics between Kafka clusters — for geo-replication, disaster recovery, or multi-cloud setups. Built on Kafka Connect, MM2 runs as Connect connectors. Key features: Active-active: both clusters can accept writes and replicate to each other (conflict-free for non-overlapping partitions). Active-passive: one cluster is primary, the other is a standby replica. Offset translation: MM2 maintains a mapping between source and target offsets so consumers can resume correctly after a failover. Configuration sync: replicate topic configurations and consumer group offsets. Renaming: replicated topics are prefixed with the source cluster alias (e.g., us-east.orders) to avoid conflicts. Deploy MM2 on the source or target cluster, or on a dedicated Connect cluster for isolation.