Apache MirrorMaker 2 continuously mirrors Kafka data between clusters, providing a practical way to protect against failures and data loss across larger distances. Unlike conventional backups, it copies messages continuously rather than creating occasional snapshots. section 16.3 section 4.4
MirrorMaker uses three Kafka Connect connectors to coordinate cross-cluster replication:
- MirrorSourceConnector mirrors topics and their ACLs. section 16.3
- MirrorCheckpointConnector handles consumer offsets. section 16.3
- MirrorHeartbeatConnector periodically checks connectivity between clusters. section 16.3
Choosing a disaster-recovery topology
An active-passive pairing keeps one cluster available for takeover after failure, whereas an active-active pairing lets both equally capable clusters operate continuously. In active-active deployments, consumers may read from both clusters and must aggregate the data appropriately. MirrorMaker 2 remote topics prevent endless mirroring loops while preserving availability during failures. section 16.4 section 16.4
Figure 4.12 Kafka alone is usually not enough. The Kafka ecosystem offers numerous components to integrate Kafka into our enterprise landscape and thus build a streaming platform.
Place MirrorMaker within the broader Kafka enterprise ecosystem, alongside monitoring, automation, compliance, and other platform components. section 4.4
