Skip to content

1. Connection Configuration Fields

Kafka connection configuration is located at:

  • config.connection
FieldTypeDescription
bootstrapServersstringBroker list (comma separated), e.g., kafka-1:9092,kafka-2:9092
clientIdstring | nullOptional client.id; defaults to ng-gateway-app-{app_id} if empty
security.protocolenumplaintext / ssl / sasl_plaintext / sasl_ssl
security.tls.*object | nullTLS configuration (Effective only for ssl / sasl_ssl)
security.sasl.*object | nullSASL configuration (Effective only for sasl_plaintext / sasl_ssl)

2. TLS Configuration (security.tls)

FieldTypeDescription (Corresponds to librdkafka ssl.*)
caLocationstring | nullCA bundle path (ssl.ca.location)
certificateLocationstring | nullClient cert path (ssl.certificate.location)
keyLocationstring | nullPrivate key path (ssl.key.location)
keyPasswordstring | nullPrivate key password (ssl.key.password)
endpointIdentificationAlgorithmstring | nullHostname verification algorithm (ssl.endpoint.identification.algorithm), commonly https or empty string (disabled)

Container Deployment Common Pitfall

Certificate path must be path inside container. You need to mount certificates into the container via volume mount, and fill in the container internal path here.


3. SASL Configuration (security.sasl)

FieldTypeDescription
mechanismenumplain / scram_sha256 / scram_sha512
usernamestringSASL username
passwordstringSASL password

4. Examples

4.1 PLAINTEXT

json
{
  "connection": {
    "bootstrapServers": "127.0.0.1:9092",
    "security": { "protocol": "plaintext" }
  }
}

4.2 SASL_SSL + SCRAM-SHA-512

json
{
  "connection": {
    "bootstrapServers": "kafka-1:9093",
    "security": {
      "protocol": "sasl_ssl",
      "tls": {
        "caLocation": "/certs/ca.pem",
        "endpointIdentificationAlgorithm": "https"
      },
      "sasl": {
        "mechanism": "scram_sha512",
        "username": "user",
        "password": "pass"
      }
    }
  }
}

Released under the Apache License 2.0.