Apache Kafka v2
Provides integration with Apache Kafka to publish records, perform bounded consumer-group reads, listen continuously, and inspect topic metadata.
Revision History
0.0.0.5 - Moves reusable format, timeout and consumer-policy settings to the Connection.
0.0.0.4 - Adds Listen.
0.0.0.3 - Corrected the display of Enums.
0.0.0.2 - Corrected the response shape to use a single Response envelope.
0.0.0.1 - Initial release.
Connection
Create an Apache Kafka Connection to define the broker endpoints, default topic and consumer group, and the security and operation settings shared by its Methods. Use separate Connections when operations need different formats or consumer policies.
| Property | Type | Description |
|---|---|---|
Bootstrap Servers |
String | Required comma-separated host:port endpoints used for initial broker discovery. |
Client ID |
String | Required client identifier included in Kafka broker requests and diagnostics. The default is flowgear-apache-kafka. |
Default Topic |
String | Optional exact topic name used when a method omits Topic. |
Default Consumer Group ID |
String | Optional consumer group used when Consume Messages or Listen omits Group ID. |
Security Protocol |
Enum | Select Plaintext, Ssl, SaslPlaintext, or SaslSsl. |
SASL Mechanism |
Enum | Select Plain, ScramSha256, or ScramSha512 when using a SASL security protocol. |
SASL Username |
String | Required principal name when Security Protocol is SaslPlaintext or SaslSsl. |
SASL Password |
Masked | Required secret when Security Protocol is SaslPlaintext or SaslSsl. |
CA Certificate PEM |
String | Optional PEM-encoded certificate authority used by TLS transports. The platform trust store is used when this is blank. |
Client Certificate PEM |
String | Optional PEM-encoded client certificate for mutual TLS. Supply this together with Client Private Key PEM. |
Client Private Key PEM |
Masked | PEM-encoded private key paired with Client Certificate PEM for mutual TLS. |
Client Key Password |
Masked | Optional passphrase for an encrypted Client Private Key PEM. |
Value Format |
Enum | Json (default), Utf8Text, or Base64, used for producing and decoding record values. |
Key Format |
Enum | Utf8Text (default) or Base64 for record keys. |
Header Value Format |
Enum | Utf8Text (default) or Base64 for header values. |
Auto Offset Reset |
Enum | Starting point when the group has no valid committed offset: Earliest (default), Latest, or Error. |
Isolation Level |
Enum | ReadCommitted (default) excludes uncommitted transactional records; ReadUncommitted can include records from transactions that later abort. |
Offset Commit Mode |
Enum | For Consume Messages: CommitAfterDelivery (default) or DoNotCommit. Listen always commits after downstream continuation. |
Delivery Timeout Seconds |
Integer | Produce acknowledgement timeout, from 1 to 300 seconds. Defaults to 30. |
Idle Timeout Seconds |
Integer | Ends a bounded consume when no record arrives for this interval, from 1 to 300 seconds. Defaults to 5. Does not end Listen. |
Metadata Timeout Seconds |
Integer | Timeout for Connection testing and topic discovery, from 1 to 300 seconds. Defaults to 10. |
Maximum Processing Interval Seconds |
Integer | Maximum interval between consumer polls, from 1 to 86400 seconds. Defaults to 300; set it above the longest expected downstream processing time. |
Setup Notes
Apache Kafka is a distributed event-streaming platform used to publish, retain, and process records across applications and services. Use this Node when a Workflow needs to exchange JSON, text, or binary data with a Kafka cluster.
- Ensure the selected Cluster can resolve and reach at least one endpoint in
Bootstrap Servers. - Configure broker ACLs for the operations the Workflow performs. Producing requires topic write access, consuming requires topic and consumer-group read access, and metadata methods require permission to inspect the relevant topics.
- The Node does not automatically create topics. Create each topic and configure its partitions and replication before running the Workflow.
- Use
Sslfor TLS without SASL authentication. UseSaslSslwhen the cluster requires SASL authentication over TLS. SaslPlaintextauthenticates but does not encrypt network traffic. Use it only on a trusted private network.SaslPlaintextandSaslSslrequireSASL UsernameandSASL Password.- TLS Connections verify the certificate chain and broker hostname. Supply
CA Certificate PEMwhen the broker certificate is not trusted by the platform trust store. - For mutual TLS, supply both
Client Certificate PEMandClient Private Key PEM. SupplyClient Key Passwordonly when the private key is encrypted. - Use the Connection test to verify broker discovery and authentication before adding the Node to a Workflow.
Methods
This Node exposes Methods for publishing records, performing bounded consumer-group reads, listening continuously, and inspecting topics and partitions.
Produce Messages
Use this method to publish one Kafka record for each row in Items. The first record is sent while the Node invocation starts, so initial validation, connection, and delivery errors surface before output streaming begins.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | Apache Kafka Connection details. |
Topic |
String | Exact destination topic. If this is blank, the Node uses Default Topic from the Connection. |
Items |
Array | Required stream of records to publish. See the Produce Item Properties table below. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One delivery row per input row. See the Produce Response Properties table below. |
Produce Item Properties
| Property | Type | Description |
|---|---|---|
Key |
String | Optional record key encoded using Key Format. |
Value |
Object | Record value encoded using Value Format. This is required unless IsTombstone is true. |
IsTombstone |
Boolean | Set to true to publish a Kafka null value. When enabled, Value must be omitted or JSON null. |
Partition |
Integer | Optional zero-based destination partition. Leave this blank to let Kafka select the partition. |
Headers |
Array | Optional ordered header rows. Duplicate header keys and null header values are preserved. |
Each Headers row contains a required string Key and an optional Value encoded using Header Value Format.
Produce Response Properties
| Property | Type | Description |
|---|---|---|
Topic |
String | Topic that accepted the record. |
Partition |
Integer | Partition that accepted the record. |
Offset |
Integer | Kafka offset assigned to the record. |
TimestampUtc |
DateTime | UTC record timestamp returned by Kafka, when available. |
Flowgear |
Object | Contains IsSuccess, Message, and a copy of the input row in Request. |
KafkaErrorCode |
String | Kafka error code for a recoverable per-item provider failure, when available. |
IsFatal |
Boolean | Indicates whether Kafka classified the provider failure as fatal, when available. |
IsRetriable |
Boolean | Indicates whether Kafka classified the provider failure as retriable, when available. |
After startup, a recoverable per-item error returns a failed Flowgear result and processing continues with the next row. Fatal producer errors stop the invocation.
Consume Messages
Use this method to read a bounded sequence of records through one Kafka consumer group. The Node confirms the topic and performs the first poll while the invocation starts, so initial provider errors surface before output streaming begins.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | Apache Kafka Connection details. |
Topic |
String | Exact source topic. If this is blank, the Node uses Default Topic from the Connection. |
Group ID |
String | Consumer group ID. If this is blank, the Node uses Default Consumer Group ID from the Connection. |
Maximum Messages |
Integer | Maximum records returned by this invocation. Enter a value from 1 to 10000. The default is 100. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row per consumed Kafka record. An idle topic returns no rows. See the Consumed Record Properties table below. |
Consumed Record Properties
| Property | Type | Description |
|---|---|---|
Topic |
String | Topic containing the record. |
Partition |
Integer | Partition containing the record. |
Offset |
Integer | Record offset within the partition. |
TimestampUtc |
DateTime | UTC record timestamp, when available. |
TimestampType |
String | Kafka timestamp classification, such as CreateTime. |
Key |
String | Record key decoded using Key Format, or null when the record has no key. |
Value |
Object | Record value decoded using Value Format, or null for a tombstone. |
IsTombstone |
Boolean | Indicates whether the Kafka record has a null value. |
Headers |
Array | Ordered header rows containing Key and Value. Duplicate keys and null values are preserved. |
CommitAfterDelivery commits a record when downstream processing requests the next row or completes the stream. If processing abandons or fails on the current row, Kafka can deliver that record again. DoNotCommit leaves the consumer group offsets unchanged.
Listen
Starts a continuous listener for one exact topic and consumer group. Use this trigger when the Workflow should process arriving records until it is stopped.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | The Apache Kafka Connection for the target cluster. |
Topic |
String | Exact topic name. Uses Default Topic from the Connection when omitted. |
Group ID |
String | Consumer group. Uses Default Consumer Group ID from the Connection when omitted. |
| Return | Type | Description |
|---|---|---|
Response |
Array | Consumed records with the same fields as Consume Messages, delivered as listener events. |
Listen remains active across empty polls. It commits each record after that record's downstream Workflow path completes and requests another item. The Connection's bounded-consume Offset Commit Mode and Idle Timeout Seconds do not change that listener behavior.
List Topics
Use this method to list topics visible to the Connection. Kafka provider errors surface to the Workflow; a cluster with no visible topics returns no rows.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | Apache Kafka Connection details. |
Include Internal Topics |
Boolean | Includes topics whose names begin with __. The default is false. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One provider-shaped row per visible topic. |
Topic Properties
| Property | Type | Description |
|---|---|---|
Topic |
String | Exact topic name. |
PartitionCount |
Integer | Number of partitions in the topic. |
Describe Topic
Use this method to inspect partition leadership and replica placement for one topic. A missing topic or Kafka provider error surfaces to the Workflow.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | Apache Kafka Connection details. |
Topic |
String | Exact topic to inspect. If this is blank, the Node uses Default Topic from the Connection. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One provider-shaped row per topic partition. |
Partition Properties
| Property | Type | Description |
|---|---|---|
Topic |
String | Exact topic name. |
Partition |
Integer | Zero-based partition number. |
LeaderBrokerId |
Integer | Broker ID of the current partition leader. |
ReplicaBrokerIds |
Array | Broker IDs hosting replicas of the partition. |
InSyncReplicaBrokerIds |
Array | Broker IDs for replicas currently in sync with the leader. |
Usage Notes
- Templates use the Connection formats for sample keys, values, and headers.
Produce MessagesandConsume Messagesare bounded Workflow operations. UseListenfor a continuous Kafka event trigger.- Kafka preserves ordering within a partition, not across all partitions in a topic.
- Producer idempotence reduces duplicate writes within one producer session. A Workflow retry can still publish a duplicate business event.
Jsonrequires valid JSON data,Utf8Textuses strict UTF-8, andBase64preserves arbitrary bytes. A record that does not match the selected format causes an error instead of being silently changed.- Tombstone records carry a Kafka null value and are commonly used by compacted topics to represent deletion.
- The Node does not provide Schema Registry serializers, Kafka transactions, or consume-transform-produce exactly-once processing.
Groups, offsets, and duplicate handling
Consumers using the same group share partitions and compete for records. Use different group IDs for Workflows or Environments that each need every event. Auto Offset Reset applies only when a valid committed offset is unavailable; selecting Earliest does not rewind an existing group's committed position.
Kafka ordering is partition-local. Failures, shutdown, rebalances, or uncertain commits can cause redelivery. Producer idempotence does not prevent duplicates caused by retrying a Workflow. Design downstream changes so that processing the same event again does not duplicate the business operation; see Eventual Consistency.
Set Maximum Processing Interval Seconds above the longest expected time between polls, including downstream work for a listener event. Exceeding it can cause a group rebalance and a rejected commit. It is not a timeout that cancels the downstream business operation for you.
Formats and upgrades
Use Json when values are JSON, Utf8Text for text, and Base64 to preserve arbitrary bytes. Decode failures stop the listener without committing the failing record. Choose compatible key and header formats as well as a value format.
When upgrading an older Kafka Step, move non-default format, timeout and consumer-policy settings into its Connection, then refresh the Step's inputs. Topic and Group ID remain Method inputs with Connection defaults. Check other Steps sharing that Connection before changing those defaults.
Examples
To listen for order events, configure a JSON value format and a consumer group dedicated to the intended Workflow and Environment. Add a Listen Step for the orders topic, then map Response.Value into the Steps that process the order. Store a stable event or business identifier after the target change succeeds so that a redelivered event can be recognized.
For a short diagnostic read, use Consume Messages with a small Maximum Messages value and DoNotCommit. This leaves the group's committed offsets unchanged; use a separate diagnostic group if you should not compete with an active production consumer.