Skip to main content

Kafka Connection

The Kafka connection type enables automations to produce and consume messages from Apache Kafka topics. It is used by the plugin-kafka plugin, which delegates to the kafka-connector.

Connection Type

PropertyValue
Type enumKAFKA
Type IDkafka
CategoryMessaging
Entity class (shared lib)KafkaConnectionDetails
Connector classKafkaConnectionDetails (connector)

Friendly Example

What you enterExample
Connection nameKafka - Event Stream
Used forPublishing and consuming business events between systems
Main details to collectBootstrap servers, topic name, security method, username, and password
Best person to provide itMessaging or platform administrator

After it is saved, workflow builders select Kafka - Event Stream in a node instead of entering these details again.

Mandatory Fields

The shared library entity and the connector have slightly different field models. The connection is stored using the shared library fields; the plugin maps them to the connector model at runtime.

Shared Library Fields (stored in MongoDB)

FieldTypeRequiredDescription
brokerUrlStringYesComma-separated list of Kafka broker addresses in host:port format (e.g., broker1:9092,broker2:9092).
serializerKeyStringYesFully qualified class name of the key serializer (e.g., org.apache.kafka.common.serialization.StringSerializer).
serializerValueStringYesFully qualified class name of the value serializer (e.g., org.apache.kafka.common.serialization.StringSerializer).

Connector Fields (used at runtime)

The connector's KafkaConnectionDetails accepts a richer set of fields for authentication and TLS:

FieldTypeRequiredDescription
bootstrapServersStringYesSame as brokerUrl. Comma-separated broker addresses.
securityProtocolStringYesSecurity protocol for broker communication. One of: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL.
clientIdStringNoClient identifier for the Kafka producer/consumer.
usernameStringNoSASL authentication username. Required when securityProtocol is SASL_PLAINTEXT or SASL_SSL.
passwordStringNoSASL authentication password. Encrypted at rest. Required when using SASL.
saslMechanismStringNoSASL mechanism. One of: PLAIN, SCRAM-SHA-256, SCRAM-SHA-512. Required when using SASL.
sslTruststoreLocationStringNoPath to the SSL truststore file. Required when securityProtocol is SSL or SASL_SSL.
sslTruststorePasswordStringNoPassword for the SSL truststore. Encrypted at rest.

Security Protocol Reference

ProtocolEncryptionAuthenticationUse Case
PLAINTEXTNoneNoneDevelopment/testing only
SSLTLSCertificate-basedEncrypted without SASL
SASL_PLAINTEXTNoneSASL (username/password)Authenticated but unencrypted (internal networks)
SASL_SSLTLSSASL (username/password)Recommended for production. Encrypted + authenticated.

Setup Instructions

  1. Identify your Kafka bootstrap servers. These are the initial broker addresses the client uses to discover the full cluster. Typically 2-3 brokers are listed for redundancy.

  2. Determine the security protocol used by your Kafka cluster:

    • For Confluent Cloud: Use SASL_SSL with PLAIN mechanism and API key/secret as username/password.
    • For Amazon MSK: Use SASL_SSL with SCRAM-SHA-512 or SSL with IAM authentication.
    • For internal clusters: Check your broker's listeners configuration in server.properties.
  3. Obtain credentials:

    • For SASL authentication, get the username and password from your Kafka administrator.
    • For SSL, obtain the truststore file and its password.
    • For Confluent Cloud, create an API key in the Confluent Cloud console.
  4. Create the connection in the Global Configurator with the fields above.

  5. Test the connection by verifying that the platform can reach the brokers and authenticate.

Troubleshooting

SymptomLikely Cause
Connection to node -1 could not be establishedBrokers are unreachable. Check hostname, port, and firewall rules.
SASL authentication failedWrong username/password or SASL mechanism mismatch
SSL handshake failedTruststore is missing, expired, or the broker's certificate is not trusted
Topic not foundThe topic does not exist. Kafka auto-create may be disabled on the cluster.
Not authorized to access groupKafka ACLs are restricting the consumer group. Ask your admin to grant access.