Skip to main content

CREATING AN KAFKA CONNECTION

Creating a Connection From UI

You must have deployed a Kafka server prior to connecting with the Kafka protocol-based application.

UI FieldDescription
Bootstrap ServersThe list of Kafka brokers to connect to. Example: kafka.actility.com:5672.
Producer Client IDThe client ID to use when connecting to the Kafka cluster for publications.
Consumer Client IDThe client ID to use when connecting to the Kafka cluster for consumming.
Consumer Group IDThe consumer group ID to use when connecting to the Kafka cluster for consumming.
Uplink TopicThe topic to publish messages to. This topic should already exist on broker.
Downlink TopicThe topic to subscribre incoming messages to. This topic should already exist on broker.
ConcurrencyThe number of consumers to use when subscribing to topics.
  1. Click Connections -> Create -> ThingPark X Iot Flow.

img

Then, a new page will open. Select the connection type : Kafka.

img

  1. Fill in the form as in the example below and click on Create.
Warning

Topics used should already be created on Kafka broker.

img

Note

Parameters marked with * are mandatory.

  • A notification appears on the upper right side of your screen to confirm that the application has been created.

img

  1. After creating the application, you will be redirected to the application details.

img

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/connections to create a new Connection instance
  • PUT/connections to update a Connection instance
  • DELETE/connections to delete a Connection instance
Note

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 FieldDescription
connectorIdMust be set to actility-kafka-iot for Kafka platform.
bootstrapServersThe list of Kafka brokers to connect to. Example: kafka.actility.com:5672.
producerClientIdThe client ID to use when connecting to the Kafka cluster for publications.
consumerClientIdThe client ID to use when connecting to the Kafka cluster for consumming.
consumerGroupIdThe consumer group ID to use when connecting to the Kafka cluster for consumming.
uplinkTopicThe topic to publish messages to. This topic should already exist on broker.
downlinkTopicThe topic to subscribre incoming messages to. This topic should already exist on broker.
concurrencyThe number of consumers to use when subscribing to topics.
Important note

All properties are not present in this example. You can check the rest of these properties in the common parameters section.

Displaying Information to Know if it Worked

  1. Open your favorite tool to check if the connector listen the downlink topic.

img

Limitations

There are currently no known limitations to the Kafka connector.

Troubleshooting

As for now, there are no detected bugs.