Skip to main content Skip to footer

Kafka Producer Documentation

Version: 2.1.0

Retrieved: 2025-10-09 15:16:00


Kafka Producer

Will send messages to Kafka

Settings

Name Requirements Purpose Default
Brokers String with length 1 to 512 The Kafka brokers to use separated by comma ``
Message Timeout Number between 1 to Int Max The timeout in seconds for sending messages to Kafka. 30
Source Property String with length 1 to 64 The pattern to locate the value to send to Kafka data
Topic* String with length 1 to 64 The topic/pattern to use when publishing ``
Headers Key/Value pairs Optional headers to attach with the message ``
Authentication Method SASL or Client Certificate The authentication method to use. Check your broker to see what to use SASL
SASL Mechanism See SASL Mechanism section Simple Authentication and Security Layer (SASL) Mechanism Plain
SASL Credentials Username/Password The SASL credentials to use when using SASL as Authentication Method ``
SASL use SSL Boolean Check to enable SSL for SASL true
Client Certificate Certificate The certificate to use when using Client Certificate as Authentication Method ``
Client Certificate Key Certificate The certificate key to use when using Client Certificate as Authentication Method ``
Verify Server Certificate Boolean If your brokers are using a self signed certificate you will need to untick Verify Server Certificate true
CA Certificate Certificate This is required if Verify Server Certificate is set to true ``
Additional Configuration Key/Value pairs Additional configuration for the Kafka connection ``

If you are using SASL as the Authentication Method you should set the SASL options, if you are using Client Certificate as the Authentication Method you should set the certificate options. CA Certificate can be applied for both SASL and Client Certificate.

* The Topic setting can be passed in to the module on the incoming message. However, this setting on the incoming message will only be used if the Topic setting is empty. If you pass in the Topic on the message is should be located at kafka.topic.

Example:

{
    'kafka' : {
        'topic': 'foo'
    }
}

SASL Mechanism

  • OAuthBearer
  • Plain
  • ScramSha256
  • ScramSha512

Example with topic in setting

Settings

Brokers = 'kafka-130cccb7-crosser-b5ad.aivencloud.com:17640'
Source Property = 'data'
Topic = 'foo'
// Security details not shown for readability

Input

{
    "data": {
        "temp": 1,
        "pressure": 47
    }
}

Output

{
    "data": {
        "temp": 1,
        "pressure": 47
    },
    "crosser": {
        "success": true
    }
}

Example with topic on incoming message

Settings

Brokers = 'kafka-130cccb7-crosser-b5ad.aivencloud.com:17640'
Source Property = 'data'
Topic = ''
// Security details not shown for readability

Input

{
    "data": {
        "temp": 1,
        "pressure": 47
    },
    "kafka": {
        "topic": "foo"
    }
}

Output

{
    "data": {
        "temp": 1,
        "pressure": 47
    },
    "kafka":{
        "topic": "foo"
    },
    "crosser": {
        "success": true
    },
}