Kafka Pub


The Kafka Pub node establishes a Kafka client that publish messages to a third-party Kafka server.

Node Type

External.

Input and Output Ability

This node has 1 entry point and 1 exit point. Both the input and the output can be any format. The input msg is the message to be published.

Node Properties

../../_images/kafka_pub.png


Name

The name for this node.


Host

The host address or domain name.


Topic

The Kafka topic to publish to.


Authentication Method

The authentication method, Anonymous or Username/Password.

  • Anonymous: Does not need any authentication.

  • Username/Password: Enter the Username and Password used for authentication.


Partition Key

Partition is the smallest storage unit that holds the records. A partition key is used to keep msgs to the same partition in the Kafka server in the order they were sent.

There are one or more partitions in a topic of the Kafka server. The messages with the same partition key will be sent to the same patition to keey the order. If not specified, msgs will be randomly sent to different partitions, and the ordering of the msgs will not be guaranteed.


You can customize the partition key. For example, enter one partition key for all messages, and all the messages will be sent to the same partition. The other partitions will not receive any message. Or enter AssetIds or ProductKeys as the partition keys for the messages from different devices, the messages from the same device will be sent to the same partition.

Supports expressions. For example, enter ${msg.assetId} for the partition key can send the messages with the same asset ID to the same partition.


Description

The description for this node.

Limitations


  • Maximum number of topics: 1

  • Maximum number of concurrencies: 8

  • As the Kafka server is not managed by EnOS, connection problems could occur due to server downtime or other instances that are not within our control.

Samples

Input Sample

Example of a JSON object as input:

{
   "externalId":"externalId",
   "timestamp":24214324324,
   "measurepoints":{
     "speed":32,
     "heat":40
   }
 }

Output Sample

{
   "externalId":"externalId",
   "timestamp":24214324324,
   "measurepoints":{
     "speed":32,
     "heat":40
   }
 }