:_mod-docs-content-type: CONCEPT

// Module included in the following assemblies:
//
// assembly-config.adoc

[id='con-config-mirrormaker2-connectors-{context}']
= Configuring MirrorMaker 2 connectors

[role="_abstract"]
MirrorMaker 2 comprises a set of connectors to synchronize data between Kafka clusters. 
You configure these connectors in the `KafkaMirrorMaker2` custom resource.

MirrorMaker 2 consists of the following connectors:

`MirrorSourceConnector`:: (Required) Replicates topics (and, if configured, ACLs) from the source cluster to the target cluster.
`MirrorCheckpointConnector`:: (Optional) Synchronizes consumer group offsets for failover support. Use this connector only when offset tracking is required.
`MirrorHeartbeatConnector`:: (Optional) Monitors connectivity between clusters. This connector is useful for monitoring and alerting but is not required for replication.

`MirrorSourceConnector` and `MirrorCheckpointConnector` are configured in the
`spec.mirrors` section of the `KafkaMirrorMaker2` custom resource using the `sourceConnector` and `checkpointConnector` properties.

These connectors run in the Kafka Connect cluster associated with the target Kafka cluster.

`MirrorHeartbeatConnector` is not configurable through the `KafkaMirrorMaker2` custom resource.
To run a `MirrorHeartbeatConnector`, use a separate `KafkaConnect` and `KafkaConnector` custom resource.
Because it produces heartbeat records to the source Kafka cluster, the `MirrorHeartbeatConnector` typically runs in a Kafka Connect cluster that stores its state in the source cluster.

For a full list of supported MirrorMaker 2 connector properties, including common configuration and connector-specific options, see the {kafkaDoc}.

WARNING: Configure the following properties with the same values in both the `MirrorSourceConnector` and `MirrorCheckpointConnector`:
`replication.policy.class`, `replication.policy.separator`, `offset-syncs.topic.location`, and `topic.filter.class`.
If these properties do not match, replication or offset synchronization can fail.