Configuring Kafka

Kafka supports extensive configurability in the KafkaProducer API and you can configure them in Sterling™ Order Management System properties, which passes these configurations through to the KafkaProducer.

You can configure Kafka in Sterling Order Management System as pass-through properties under the property vendor of kafka. You can configure a group of properties for a specific Kafka cluster but you can also configure multiple Kafka configurations for a single cluster. Each such configuration group is identified by their configuration group ID.

You can configure a configuration group ID, for example cl1 and define producer configurations by using the following Kafka property pattern.
- cgrp.cl1.producer.<config_key>=<config_value>
In this example, <config_key> represents the configuration key to be passed through to the KafkaProducer API and <config_value> represents its configurable value.
You can define global level pass-through producer configurations with the help of global configuration group ID as follows.
- cgrp.global.producer.<config_key>=<config_value>

You can define the override property in the customer_overrides.properties file with kafka.prefix.

Following are the three Sterling Order Management System default properties that are implicitly configured for each configuration group that represents mandatory Kafka producer configurations.
- cgrp.<config_group_id>.producer.bootstrap.servers - OMS default value 'localhost:9092'
- cgrp.<config_group_id>.producer.key.serializer - OMS default value 'org.apache.kafka.common.serialization.StringSerializer'
- cgrp.<config_group_id>.producer.value.serializer - OMS default value 'org.apache.kafka.common.serialization.StringSerializer'

If any Kafka configuration is not provided as a pass-through property or not overridden at service level, Kafka assumes the default Kafka value for the same.

For more information, see Kafka documentation.