Kafka Producer
Writes messages to Kafka topics
Processing
For every input row, the step writes a message to a kafka topic.
Settings
Name | Type | Description |
---|---|---|
General | ||
Connection |
dict |
The Kafka connection to use. Evaluated for each input row |
Mode |
string |
The producer can operate in two modes:
Evaluated for each input row |
Topic |
string |
The topic to write messages to. Evaluated for each input row |
Key |
string or binary |
The key of the current message. Leave as Both string and binary data types are supported. Evaluated for each input row |
Message |
string or binary |
The message to write. Both string and binary data types are supported. Evaluated for each input row |
Timestamp |
datetime or long |
The timestamp of the current message. Leave as You can use the following datatypes:
Evaluated for each input row |
Message Details | ||
partition |
long |
The partition to write the current message to. Use Evaluated for each input row |
headers |
list |
Any headers to set for the message. Each header entry in the list is a dict with Header names are strings, header values can be of type string or binary. Evaluated for each input row |
Producer Config | ||
Client ID |
string |
The Client ID of the producer. Evaluated for each input row |
Use Transactions |
boolean |
When true, the producer uses transactions to write messages to the broker. Make sure to review Kafka transactional semantics and configuration before using this feature. Be sure to set a transactional.id in properties. The producer wraps messages in transactions. Transactions are committed when any of the following conditions are met:
Note that any change to the properties setting causes a commit of an open transaction. The Supported ModesTransactions are designed to be used in
Evaluated once when step initializes |
Commit Size |
long |
Only used when transactions are enabled. The following values are possible:
Any other values produce an error. Evaluated once when step initializes |
Properties |
dict or list |
Additional producer properties to use. See Kafka Configuration documentation for details. Any properties given override properties already defined in the Kafka connection. If you supply a dict, the keys and values are interpreded as property names and values. If you supply a list, each item must be of the form: |
Results
Name | Type | Description |
---|---|---|
meta |
dict |
In The meta-data has the following form:
|