Kafka
Apache Kafka is a software framework for stream-processing of large amounts of data. It is an open-source software platform developed by the Apache Software Foundation, written in Scala and Java. The project aims to provide a unified, high-throughput, low-latency platform for handling real-time data feeds.
This protocol implementation allows to send the data from the Connectware to an Apache Kafka broker for message processing or to subscribe to a particular topic to receive data.
Currently, the protocol supports authentification by means of SASL and compression of produced messages by using GZIP.
Message assembly
The endpoints in this protocol are available for the write and subscribe operations only. To transmit messages to the Kafka broker, a JSON message with the payload as value needs to be sent to the respective endpoint. The message may look as follows when producing messages to the broker:
{
'id': 123321,
'topic': 'some_test_topic',
'acks': 1,
'timeout': 3000,
'compression': 'None',
'value':
[
{ 'key': 'sample-key 1', 'value': 'sample message #1', 'partition': 0, 'headers': { 'foo': 'bar' }, 'timestamp': 1633425301000 },
{ 'key': 'sample-key 2', 'value': 'sample message #2', 'partition': 1, 'headers': { 'foo': 'bar' }, 'timestamp': 1633425301001 },
],
}Which upon successful delivery, the following message will be generated on the /res topic:
And when delivery is unsuccessful, you will get the following message explaining what happened:
Upon subscription you will get messages like this:
Commissioning File Specifics
The Endpoints for the Kafka connections may only be of the type write or subscribe.
Special care must be taken when configuring the connection properties since connections can only take all write endpoints or all subscribe endpoints. But not both at the same time.
To choose the type of connection you are planning to use, you will need to configure the property clientType on the connection resource.
Further configuration options are listed below:
Service Commissioning File Example
Last updated
Was this helpful?

