// Module included in the following assemblies:
//
// assembly-kafka-mirror-maker-configuration.adoc

[id='ref-kafka-mirror-maker-configuration-{context}']
= Kafka Mirror Maker configuration

Kafka Mirror Maker can be configured using the `config` sub-property in `KafkaMirrorMaker.spec.consumer` and `KafkaMirrorMaker.spec.producer`.
This property should contain the Kafka Mirror Maker consumer and producer configuration options as keys.
The values could be in one of the following JSON types:

* String
* Number
* Boolean

Users can specify and configure the options listed in the {ApacheKafkaProducerConfig} and {ApacheKafkaConsumerConfig} with the exception of those options which are managed directly by {ProductName}.
Specifically, all configuration options with keys equal to or starting with one of the following strings are forbidden:

* `ssl.`
* `sasl.`
* `security.`
* `bootstrap.servers`
* `group.id`

When one of the forbidden options is present in the `config` property, it will be ignored and a warning message will be printed to the Custer Operator log file.
All other options will be passed to Kafka Mirror Maker.

IMPORTANT: The Cluster Operator does not validate keys or values in the provided `config` object.
When an invalid configuration is provided, the Kafka Mirror Maker might not start or might become unstable.
In such cases, the configuration in the `KafkaMirrorMaker.spec.consumer.config` or `KafkaMirrorMaker.spec.producer.config` object should be fixed and the cluster operator will roll out the new configuration for Kafka Mirror Maker.

.An example showing Kafka Mirror Maker configuration
[source,yaml,subs=attributes+]
----
apiVersion: {KafkaApiVersion}
kind: KafkaMirroMaker
metadata:
  name: my-mirror-maker
spec:
  # ...
  consumer:
    config:
      max.poll.records: 100
      receive.buffer.bytes: 32768
  producer:
    config:
      compression.type: gzip
      batch.size: 8192
  # ...
----
