Apache Kafka Connector: Configuration
To use the adapter, a configuration file with the extension .kafka
is required at the main level of the project.
The values for clientId
, pollIntervallMillis
and maxRequestsToBroker
can also be set via adapter parameters.
If not all parameters are set via the adapter parameters, the values from kafka.kafka
are used.
Information on the adapter function:
The adapter publishes messages based on the ClientID and subscribes to topics according to the parameters set in the configuration file.
It is only possible to subscribe to all topics. After subscribing, all messages from all topics will be received. The subscription runs in the background with the defined frequency of retrievals. When new messages are published, they are received automatically.
Example of a configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<KafkaConfiguration>
<threadPoolSize>10</threadPoolSize>
<broker server = "localhost:29092">
<client id="1">
<topic filter="topic1"></topic>
<pollIntervallMillis>50</pollIntervallMillis>
<process url="Processes/data.wrf"></process>
<maxRequestsToBroker>10</maxRequestsToBroker>
</client>
</broker>
</KafkaConfiguration>
The following attributes and elements are contained in the configuration file:
Element / Attribute | Description |
---|---|
| Root element of the configuration file |
| Number of usable threads |
| Host and port of the broker |
| ID of the client with which the message is published |
| Topic that can be subscribed to in order to receive the published message. It has the following attribute:
|
| Frequency of retrieval of messages from the broker during the subscription in milliseconds Example: 50 means that the subscriber retrieves messages from the broker every 50 milliseconds. It only retrieves messages that have not yet been retrieved. Possible values:
|
| Specifies the process in which the received data is to be used. The received data is written to the process as XML. Possible values: Path to the process Example:
|
| The |