CREATING A KAFKA CONNECTION
Available since ThingPark X IoT Flow 1.7.1.
The Kafka connector publishes the uplinks of your devices to a topic of your Kafka cluster, and consumes another topic of the cluster to receive the downlinks.
The data follows this path: LoRaWAN® device → ThingPark Enterprise → ThingPark X IoT Flow connection → your Kafka cluster → your application.
Before you create the connection, you need a Kafka cluster reachable from ThingPark X IoT Flow, with the uplink and downlink topics already created.
Collecting Expected Information
Parameters required
| UI Field | Description |
|---|---|
| Name | Name of the connection. |
| Bootstrap Servers | List of the Kafka brokers to connect to, one entry per broker, for example broker1.mydomain.com:9092. |
| Uplink Topic | Topic where the connector publishes the uplinks. This topic must already exist on the cluster. |
| Downlink Topic | Topic where the connector receives the downlinks. This topic must already exist on the cluster. |
| Producer Client ID | Client ID of the connector when it publishes to the Kafka cluster. |
| Consumer Client ID | Client ID of the connector when it consumes from the Kafka cluster. |
| Consumer Group ID | Consumer group ID of the connector when it consumes from the Kafka cluster. |
| Concurrency | Number of consumers used to subscribe to the topics. |
| Security Protocol | How the connector secures the communication with the Kafka brokers: PLAINTEXT (default), SSL, SASL_PLAINTEXT or SASL_SSL. With SASL_PLAINTEXT and SASL_SSL, the form also asks for the SASL Mechanism (PLAIN, SCRAM-SHA-256, SCRAM-SHA-512, GSSAPI or OAUTHBEARER), the SASL Username / Client ID and the SASL Password / Client Secret. With SSL and SASL_SSL, it asks for the Domain Certificate (X.509) that validates the identity of the brokers, and an optional Private Key for mutual TLS. |
| Description | Optional description of the connection. |
The topics used by the connection must already exist on the Kafka cluster.
Creating a Connection With UI
-
In ThingPark Enterprise, click Connections -> + Add Connection -> ThingPark X IoT Flow.

-
In ThingPark X IoT Flow, click Kafka in the list of connectors.

-
Fill in the form:
- Name: a clear name for the connection, for example
My Kafka Connection. - Bootstrap Servers: click + to add each broker of your cluster, with its port.
- Uplink Topic: the topic of the uplinks, already created on the cluster.
- Downlink Topic: the topic of the downlinks, already created on the cluster.
- Producer Client ID: the client ID used to publish the uplinks.
- Consumer Client ID: the client ID used to consume the downlinks.
- Consumer Group ID: the consumer group ID used to consume the downlinks.
- Concurrency: the number of consumers, for example
1. - Security Protocol: keep PLAINTEXT, or select the protocol of your cluster and fill in the fields it adds.
- Description: optional.

- Name: a clear name for the connection, for example
-
Click Create. A notification confirms that the connection has been created, and the connection details open.
-
In the connection details, check that the connection is OPENED (see Connection States).
Parameters marked with * are mandatory.
Creating a Connection With API
The creation of a connection establishes a bidirectional messaging transport link between ThingPark X IoT Flow and the broker.
To do this, you need to use the Connections group resource:
POST /connectionsto create a new Connection instancePUT /connectionsto update a Connection instanceDELETE /connectionsto delete a Connection instance
We follow the REST-full API pattern, when updating configuration properties for a connection resource. Thus, you must also provide the whole configuration again.
Example for creation of a new connection instance:
POST /connections
{
"connectorId":"actility-kafka-iot",
"name":"Kafka - Official",
"configuration":{
"bootstrapServers": "kafka1:9091,kafka2:9091,kafka3:9091",
"producerClientId": "actility-kafka-producer",
"consumerClientId": "actility-kafka-consumer",
"consumerGroupId": "actility-kafka-cg",
"uplinkTopic": "ActilityUplinkTopic",
"downlinkTopic": "ActilityDownlinkTopic",
"concurrency": 1
}
}
The following table lists the properties applicable to a connection instance.
| JSON Field | Description |
|---|---|
connectorId | Must be set to actility-kafka-iot. |
configuration/bootstrapServers | The Kafka brokers to connect to, separated by commas, for example broker1.mydomain.com:9092,broker2.mydomain.com:9092. |
configuration/producerClientId | The client ID used when connecting to the Kafka cluster to publish. |
configuration/consumerClientId | The client ID used when connecting to the Kafka cluster to consume. |
configuration/consumerGroupId | The consumer group ID used when connecting to the Kafka cluster to consume. |
configuration/uplinkTopic | The topic to publish the uplinks to. This topic must already exist on the cluster. |
configuration/downlinkTopic | The topic to consume the downlinks from. This topic must already exist on the cluster. |
configuration/concurrency | The number of consumers used to subscribe to the topics. |
configuration/securityProtocol | PLAINTEXT, SSL, SASL_PLAINTEXT or SASL_SSL. |
All properties are not present in this example. You can check the rest of these properties in the common parameters section.
Associating Devices With the Connection
In ThingPark Enterprise, open Devices, select a device, and add the connection to the Connections of the device. You can also select the connection when you create a device, or for many devices at once with a CSV file in Devices -> Bulk Operations.
Displaying Information to Know if It Worked
Open a Kafka administration tool connected to your cluster. The uplink topic receives the uplinks of your devices, and the connector appears as a consumer of the downlink topic.

Limitations
There are currently no known limitations to the Kafka connector.
Troubleshooting
There is no known issue with the Kafka connector.