// This assembly is included in the following assemblies:
//
// assembly-deployment-configuration.adoc

//attribute for use in snip-inline-logging.adoc
:kind: KafkaMirrorMaker

// Save the context of the assembly that is including this one.
// This is necessary for including assemblies in assemblies.
// See also the complementary step on the last line of this file.
:parent-context-deployment-configuration-kafka-mirror-maker: {context}

[id='assembly-deployment-configuration-kafka-mirror-maker-{context}']
= Kafka MirrorMaker configuration

:context: deployment-configuration-kafka-mirror-maker

This chapter describes how to configure a Kafka MirrorMaker deployment in your {ProductName} cluster to replicate data between Kafka clusters.

You can use {ProductName} with MirrorMaker or MirrorMaker 2.0.
MirrorMaker 2.0 is the latest version, and offers a more efficient way to mirror data between Kafka clusters.

[discrete]
== MirrorMaker

If you are using MirrorMaker, you configure the `KafkaMirrorMaker` resource.

The following procedure shows how the resource is configured:

* xref:configuring-kafka-mirror-maker-{context}[Configuring Kafka MirrorMaker]

Supported properties are also described in more detail for your reference:

* xref:con-configuring-mirror-maker-{context}[Kafka MirrorMaker configuration properties]

The full schema of the `KafkaMirrorMaker` resource is described in the xref:type-KafkaMirrorMaker-reference[KafkaMirrorMaker schema reference].

NOTE: Labels applied to a `KafkaMirrorMaker` resource are also applied to the Kubernetes resources comprising Kafka MirrorMaker.
This provides a convenient mechanism for resources to be labeled as required.

[discrete]
== MirrorMaker 2.0

If you are using MirrorMaker 2.0, you configure the `KafkaMirrorMaker2` resource.

MirrorMaker 2.0 introduces an entirely new way of replicating data between clusters.

As a result, the resource configuration differs from the previous version of MirrorMaker.
If you choose to use MirrorMaker 2.0, there is currently no legacy support, so any resources must be manually converted into the new format.

How MirrorMaker 2.0 replicates data is described here:

* xref:con-mirrormaker-{context}[MirrorMaker 2.0 data replication]

The following procedure shows how the resource is configured for MirrorMaker 2.0:

* xref:proc-mirrormaker-replication-{context}[Synchronizing data between Kafka clusters]

The full schema of the `KafkaMirrorMaker2` resource is described in the xref:type-KafkaMirrorMaker2-reference[KafkaMirrorMaker2 schema reference].

include::../modules/proc-configuring-mirror-maker.adoc[leveloffset=+1]

include::../modules/con-configuring-mirror-maker.adoc[leveloffset=+1]

include::../modules/ref-list-of-kafka-mirror-maker-resources.adoc[leveloffset=+1]

include::mirrormaker2/assembly-mirrormaker.adoc[leveloffset=+1]

// Restore the context to what it was before this assembly.
:context: {parent-context-deployment-configuration-kafka-mirror-maker}
