Skip to main content

Kafka

📨

Kafka

Produce and consume messages with Apache Kafka

The Kafka node integrates with Apache Kafka clusters for event-driven workflows. You can produce messages to topics, consume messages, and manage topics (create, delete, list, describe). This is useful for event-driven automation, data pipeline orchestration, and inter-system communication.

Before You Use This Node​

What you may needWhere to set it upWhy it matters
Kafka cluster connectionConnectionsCreate the Kafka connection once, then reuse it for publish, consume, and topic actions.
Topic names or standard message valuesGlobal VariablesKeep shared event names and IDs consistent across workflows.
Certificates, if your Kafka setup uses themCertificatesStore certificate material centrally instead of repeating it in steps.

Actions​

ActionDescription
kafka:sendMessagePublish a message to a Kafka topic
kafka:consumeMessagesConsume messages from a Kafka topic
kafka:createTopicCreate a new Kafka topic
kafka:deleteTopicDelete a Kafka topic
kafka:listTopicsList all topics in the cluster
kafka:describeTopicGet metadata about a topic (partitions, replicas, config)

kafka:sendMessage​

Publishes one or more messages to a Kafka topic.

Parameters

ParameterTypeRequiredDescription
topicstringYesTarget topic name
keystringNoMessage key for partitioning
valuestringYesMessage value (typically JSON)
headersobjectNoKey-value pairs attached as Kafka message headers
partitionintegerNoSpecific partition to send to. If omitted, the default partitioner is used

kafka:consumeMessages​

Consumes messages from one or more partitions of a topic. This is a polling operation that reads currently available messages up to the configured limit.

Parameters

ParameterTypeRequiredDescription
topicstringYesTopic to consume from
groupIdstringNoConsumer group ID. If omitted, a temporary group is used
maxMessagesintegerNoMaximum number of messages to consume. Defaults to 10
timeoutintegerNoPoll timeout in milliseconds. Defaults to 5000
fromBeginningbooleanNoStart from the earliest offset. Defaults to false (latest)

Consumer Groups and Offset Management​

  • When groupId is provided, Kafka tracks offsets for that group. The next consume call picks up where the last one left off, providing at-least-once delivery.
  • When groupId is omitted, a temporary group is created. Messages are read but offsets are not committed, so the same messages may be read again on subsequent calls.
  • Setting fromBeginning: true resets the consumer to the earliest offset. This is useful for reprocessing all messages in a topic.
  • Multiple jobs using the same groupId share the workload across partitions. Each partition is assigned to only one consumer in the group at a time.

kafka:createTopic​

Creates a new topic in the Kafka cluster.

Parameters

ParameterTypeRequiredDescription
topicstringYesTopic name
partitionsintegerNoNumber of partitions. Defaults to 1
replicationFactorintegerNoReplication factor. Defaults to 1
configobjectNoTopic-level configuration overrides (e.g., retention.ms, cleanup.policy)

kafka:deleteTopic​

Deletes a topic from the Kafka cluster. This is irreversible.

Parameters

ParameterTypeRequiredDescription
topicstringYesTopic name to delete

kafka:listTopics​

Lists all topics in the cluster.

Parameters

No additional parameters required.

kafka:describeTopic​

Returns metadata about a topic including partition count, replica assignments, and configuration.

Parameters

ParameterTypeRequiredDescription
topicstringYesTopic name

Connection​

Requires a Kafka connection configured in the Global Configurator:

FieldDescription
bootstrapServersComma-separated list of Kafka broker addresses (e.g., broker1:9092,broker2:9092)
securityProtocolPLAINTEXT, SSL, SASL_PLAINTEXT, or SASL_SSL
saslMechanismPLAIN, SCRAM-SHA-256, or SCRAM-SHA-512 (when using SASL)
saslUsernameSASL username
saslPasswordSASL password
sslTruststoreLocationPath to SSL truststore (when using SSL)
sslTruststorePasswordTruststore password

Configure under Connections > Kafka in the Global Configurator.

Delivery Guarantees​

  • sendMessage: At-least-once delivery. The producer waits for broker acknowledgement before reporting success.
  • consumeMessages: At-least-once when using consumer groups. The offset is committed after messages are read, so a failure mid-processing may result in redelivery.
  • Exactly-once semantics: Kafka does not provide exactly-once delivery out of the box in this integration. To achieve effectively-once processing, implement idempotent logic in your workflow (for example, check whether a record has already been processed before acting on it).

Best Practices​

  • Use meaningful consumer group names (e.g., order-processor, invoice-sync) rather than generic names like group1.
  • Set an appropriate maxMessages value to avoid processing too many messages in a single step. Start small and increase as needed.
  • Use message keys for ordering guarantees. Messages with the same key are routed to the same partition, preserving their order.
  • Monitor topic lag (the difference between the latest offset and the consumer group's committed offset) to detect processing delays.
  • Handle failed message processing by logging the failure and continuing rather than stopping the entire workflow. You can send failed messages to a dead-letter topic for later review.

Common Problems​

SymptomLikely CauseFix
Connection refusedIncorrect bootstrapServers or wrong security protocolVerify broker addresses and that securityProtocol matches the cluster configuration
Authentication failedInvalid SASL credentialsCheck saslUsername, saslPassword, and saslMechanism in the connection settings
No messages consumedWrong topic name, missing groupId, or fromBeginning not setConfirm the topic exists with kafka:listTopics, and set fromBeginning: true if you need to read from the start
Messages consumed but not processedThe step after consume is failingCheck subsequent step logs for errors. The consume itself succeeded
Topic creation failedInsufficient cluster permissionsVerify the connection credentials have topic-admin privileges on the cluster

Output​

sendMessage​

consumeMessages​

listTopics​

describeTopic​