Apama 10.3.1 | Apama Documentation | Connecting Apama Applications to External Components | Standard Connectivity Plug-ins | The Kafka Transport Connectivity Plug-in | Configuring the connection to Kafka (dynamicChainManagers)
 
Configuring the connection to Kafka (dynamicChainManagers)
You configure one or more dynamicChainManagers to connect to different Kafka brokers. For example:
dynamicChainManagers:
kafkaManager:
transport: kafkaTransport
managerConfig:
channelPrefix: "kafka:"
bootstrap.servers: "localhost:9092"
Connection-related configuration is specified in the managerConfig stanza on the dynamicChainManagers instance. The following configuration options are available for managerConfig:
Configuration option
Description
bootstrap.servers
This is the only option in the Kafka configuration for which you must specify a value. You can either set it under managerConfig (to be used as the default for all consumers and producers) or in the configuration of a specific consumer or producer (which overrides any default given in the parent chain manager).
When this option is set under managerConfig, it is used as the default. It needs to be enclosed in quotation marks. Example:
bootstrap.servers: "localhost:62618"
Type: string.
channelPrefix
Prefix for dynamic mapping. If the prefix ends with a colon (:), it needs to be enclosed in quotation marks (see also Using YAML configuration files).
When the channel is mapped to a Kafka topic, the prefix is not used. For example, if the prefix is "kafka:", then the channel kafka:test/a maps to the Kafka topic test/a.
Type: string.
Default: "kafka:".
consumerConfig
Keys and values of the consumer configuration options in Kafka. See the Kafka documentation at https://kafka.apache.org/documentation/ for detailed information on the consumer configs.
Some default values are provided by the Kafka transport, but you can override them by specifying different values.
The default values are:
*group.id: A unique identifier for every instance.
*session.timeout.ms: "30000"
*key.deserializer: "org.apache.kafka.common.serialization.StringDeserializer"
*value.deserializer: "org.apache.kafka.common.serialization.StringDeserializer"
Type: map.
producerConfig
Keys and values of the producer configuration options in Kafka. See the Kafka documentation at https://kafka.apache.org/documentation/ for detailed information on the producer configs.
Some default values are provided by the Kafka transport, but you can override them by specifying different values.
The default values are:
*linger.ms: 0
*key.serializer: "org.apache.kafka.common.serialization.StringSerializer"
*value.serializer: "org.apache.kafka.common.serialization.StringSerializer"
Type: map.
log4jConfigFile
Controls the verbosity of the Kafka transport. A kafka-transport-log4j.properties file is provided in the etc folder of your Apama installation.
Kafka allows clients to connect over SSL. You use the consumerConfig and producerConfig configuration options of the Kafka transport to specify the SSL configuration. See the Kafka documentation at https://kafka.apache.org/ for detailed information on how to configure Kafka clients to use SSL.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.