Apache Kafka
Apache Kafka enables you to store and process data streams via a distributed streaming platform. Various interfaces allow data to be written to Kafka clusters, data to be read or imported or exported from third-party systems. Due to its high fault tolerance and scalability, Apache Kafka is suitable for large amounts of data and applications, e.g. in the big data environment.
For more information about using Apache Kafka in a local environment, see https://kafka.apache.org/quickstart.
For more information about configuring and integrating TLS certificates in Apache Kafka Cluster, see http://kafka.apache.org/documentation/#security_ssl.
A configuration file is required in the X4 server installation to use the two adapters (7.4.0-en) Apache Kafka Publisher or (7.4.0-en) Apache Kafka Subscriber. This configuration file must be called apachekafka-config.xml
and located in the X4DB/0
folder. When the X4 server is started, all information from this file is loaded.
The following XML file shows all required elements and attributes in the correct structure:
Information on subscriberProperties and publisherProperties
In the apachekafka-config.xml
configuration file, the following properties can optionally be set for each client:
The
subscriberProperties
can be set for the Apache Kafka Subscriber for theAssign
andSubscribe
operations.The
publisherProperties
can be set for the Apache Kafka Publisher for thePublish
operation.
subscriberProperties
and publisherProperties
can be set for only one client and for only one operation.
Note:
The behavior of subscriberProperties
overwrites the default value, that is set in the autoCommitIntervalMS
element if this values has been set again in the subscriberProperties
.
The most important elements and attributes are explained in more detail below:
Element / Attribute | Description |
---|---|
| Must be unique. Defines the parameters required to configure the connection to a particular Kafka cluster. The |
| URL of the cluster. Supports the TCP protocol. Possible values: |
| Defines the SSL/TLS configuration parameters. |
| Password of the private key in the keystore file. |
| Defines where the keystore to be used is located and which password is stored. |
| Defines where the trust store to be used is located and which password is stored. |
| Information about the client that is used to publish messages on a specific topic. |
| Defines the group ID used to group the connections. |
| Defines the frequency of commits in milliseconds. This attribute is required for the adapter (7.4.0-en) Apache Kafka Subscriber. |
| Topic in which the messages are published. |
| Name of the topic |
| Properties that can be set for the Apache Kafka Subscriber adapter.
You can find more information in the official Apache Kafka documentation (Subscriber and Consumer are synonymous here). Examples of possible values when using the Consumer: https://kafka.apache.org/22/documentation.html#consumerconfigs |
| Properties that can be set for the Apache Kafka Publisher adapter.
You can find more information in the official Apache Kafka documentation (Publisher and Producer are synonymous here). Examples of possible values when using the Producer: https://kafka.apache.org/22/documentation.html#producerconfigs
|
The values for KeyStore
, TrustStore
, and privateKeyPassword
can also be set via adapter parameters. Values set via adapter parameters override the values from apachekafka-config.xml
.