Kafka Producer

Apache Kafka producer activity sends a record to a specified topic or channel in the Kafka cluster.

Settings

On the Settings tab, you can define the Apache Kafka connection and its details as given in the following table:

Condition Applicable Field Description
N/A Apache Kafka Connection Select the connection you want to use from the drop-down list.
N/A Acks Mode Select one of the following acknowledgement modes from the drop-down list:
  • None: To receive no acknowledgement on record delivery
  • Leader: To receive an acknowledgement on record delivery from the leader
  • All: To receive acknowledgement on record delivery from leaders and all in-sync replicas
Applicable only when All is selected in the Ack Mode field. Ack Timeout The amount of waiting time in milliseconds to receive confirmation.
N/A Compression Type Select a compression type: None, GZIP, or LZ4.
N/A Value Serializer Select the type of record value to be sent: String or JSON.
N/A Max Request Size The maximum size of buffered records that can be sent in one request.

Default value: 1048576 bytes

N/A Max Messages The maximum number of records that can be sent in a single broker request.
N/A Frequency The frequency of sending buffered records in milliseconds.

Default value: 1000

Input Settings

Condition Applicable Field Description
N/A Headers Header record to be sent. Only String datatype value is supported.
Note: Headers are supported in the Apache Kafka version 0.11.0 and later.
Applicable only when JSON is selected in the Value Serializer field. Schema for JSON value The JSON schema for the Apache Kafka record value.

Input

Condition Applicable Field Description
N/A topic Name of the topic.
N/A partition Partition number of the record to send.
N/A key Optional key value.
Applicable only when String is selected in the Value Serializer field. stringValue String value to be send
Applicable only when JSON is selected in the Value Serializer field. jsonValue Complex data structure based on JSON schema that you have configured on the Input Settings tab.
N/A headers Header value to be sent

Output

Condition Applicable Field Description
N/A topic Name of the topic.
N/A partition Partition number of the record to send.
N/A offset Offset of the record.

Iterator

Use the Iterator tab to iterate a certain piece of logic multiple times. If you leave this tab blank, the activity is executed only once. For more information about Iterator, see "Using the Iterator in an Activity" in the TIBCO Flogo® apps documentation.