Skip to main content
Skip table of contents

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:

CODE
<?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

KafkaConfiguration

Root element of the configuration file

threadPoolSize

Number of usable threads

broker server

Host and port of the broker

Client ID

ID of the client with which the message is published

topic filter

Topic that can be subscribed to in order to receive the published message. It has the following attribute:

  • filter: Name of the topic filter

pollIntervallMillis

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:

Integer above 0

process url

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:

"Processes/data.wrf"

maxRequestsToBroker

The maxRequestToBroker parameter allows to define the maximum number of allowed messages that can be published without a response from the broker. This is necessary, because the clients of the .kafka configuration can be publisher and subscriber at the same time.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.