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

// 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.

[id='con-kafka-mirror-maker-configuration-{context}']

= Kafka producer and consumer

Use the `consumer.config` and `producer.config` properties to configure Kafka options for the consumer and producer.

The `config` property contains the Kafka MirrorMaker consumer and producer configuration options as keys, with values set in one of the following JSON types:

* String
* Number
* Boolean

.Exceptions

You can specify and configure standard Kafka consumer and producer options:

* {ApacheKafkaProducerConfig}
* {ApacheKafkaConsumerConfig}

However, there are exceptions for options automatically configured and managed directly by {ProductName} related to:

* Kafka cluster bootstrap address
* Security (encryption, authentication, and authorization)
* Consumer group identifier

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 a forbidden option is present in the `config` property, it is ignored and a warning message is printed to the Custer Operator log file.
All other options are passed to Kafka MirrorMaker.

IMPORTANT: The Cluster Operator does not validate keys or values in the provided `config` object.
When an invalid configuration is provided, the Kafka MirrorMaker 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 MirrorMaker.
