Use
The Kafka producer can send messages in the msg.payload to a defined Kafka topic and partition. The msg.payload is created from data that is passed to this node from one or multiple Inject nodes.
Properties
Attribute | Values | Remarks |
---|
Name | any string | Enter a self-explaining name of the node. If you leave this field empty, the generic name displays in the dashboard. |
Type | Producer | The value is pre-selected. Do not change! |
Broker | a Kafka broker id (string) | The Kafka brokers are configured for all flows. The Kafka brokers can be selected in the node properties, to set the respective id. |
Topic | topic name (string) | Enter the name of the topic to subscribe. You can configure multiple topics in one node. |
Require Ack | 0|1 | If 0, the producer does not wait for acknowledgement from the leader to consider a message as sent. If 1, the producer waits for acknowledgement from the leader to consider a message as sent. |
Ack Timeout (Ms) | any integer value | Defaults to 100. The time that the producer waits for acknowledgement from the leader. This value is only effective if Require ack = 1. |
Partitioner | default|random|cyclic|keyed|custom | Defaults to default. The partitioner determines how messages are distributed between partitions of a topic. |
Key | partition key | Sets a partition implicitly. Defines a key that is assigned to messages. Kafka publishes all messages with the same key to the same partition. |
Partition | any integer value | Sets a partition explicitly. Kafka publishes messages to the respective partition. |
Attributes | No compression|Compress using GZip|Compress using snappy | Defaults to No compression. Select a compression method for messages if desired. |
Convert message to JSON | true|false | If true, the Kafka message is converted into a JSON object. If false, the Kafka message is passed as is. |
Topic replace / with . | true|false | Replaces a slash (/) with a dot (.) in the topic name. Depending on the Kafka configuration, dot characters may not be allowed in topic names. |
Example
Integration with Kafka