9.49.1 Kafka Agents Preparations

If you set the property install.str.config-script to str-template/basic.sh in install.xml during the installation of , the zookeeper and kafka services are available in custom.conf, as custom services. If you do not set this property during installation, you can add the zookeeper and kafka services as custom services by taking the following steps:

To configure the zookeeper service, run the following command:

mzsh topo set -l services:custom/obj:zookeeper '{     
       zookeeper1 {
        template: "1/standard/basic"
        config {
          startup-natures: [default]
        }
      }
}'

To configure the Kafka service, run the following command:

mzsh topo set -l services:custom/obj:kafka '{     
       kafka1 {
        start-after=["zookeeper/zookeeper1"]
        template: "1/standard/basic"
        config {
          zookeeper: "zookeeper1"
          deployment-info: [{ sc:"sc1",brokerid:1},{ sc:"sc2",brokerid:2},{ sc:"sc3",brokerid:3}]
        }
      }
}'

Running these two commands adds the zookeeper and Kafka service configurations to the custom.conf.

To change the log level of the Kafka Client library,

mzsh topo set topo://container:main1/pico:ec1/val:config.properties.kafka.log.level <log level>

E.g: mzsh topo set topo://container:main1/pico:ec1/val:config.properties.kafka.log.level ERROR

Note: This command adds the entry “kafka.log.level=ERROR” to the ec1.conf file.


This section includes the following subsection:

9.49.1.1 Quick Start of Embedded Kafka