Kafka Connect

This page provides examples for defining a connection to Kafka Connect Clusters.

Simple configuration, with JMX metrics

The URLs (workers) should always have a scheme defined (http:// or https://).

This example uses an optional AES-256 key. The key decodes values encoded with AES-256 to enable passing encrypted values to connectors. It is only needed if your cluster uses AES-256 Decryption plugin.

connections:
  kafkaConnect:
    - name: my-connect-cluster-name
      version: 1    
      tags: ["tag1"]
      configuration:
        workers:
          value:
            - http://my-kc.worker1:8083
            - http://my-kc.worker2:8083    

Basic authentication

For Basic Authentication, define username and password properties.

connections:
  kafkaConnect:
    - name: my-connect-cluster-name
      tags: ["tag1"]
      version: 1      
      configuration:
        workers:
          value:
            - http://my-kc.worker1:8083
            - http://my-kc.worker2:8083    
        username: 
          value: my-username
        password: 
          value: my-password

TLS with custom truststore

A custom truststore is needed when the Kafka Connect workers are served over TLS (encryption-in-transit) and their certificates are not signed by a trusted CA.

connections:
  kafkaConnect:
    - name: my-connect-cluster-name
      tags: ["tag1"]
      version: 1      
      configuration:
        workers:
          value:
            - http://my-kc.worker1:8083
            - http://my-kc.worker2:8083    
        sslTruststore:
          file: /path/to/my/truststore.jks
        sslTruststorePassword: 
          value: myPassword

TLS with client authentication

A custom truststore might be necessary too (see above).

connections:
  kafkaConnect:
    name: my-connect-cluster-name
    tags: ["tag1"]
    version: 1    
    configuration:
      workers:
        value:
          - http://my-kc.worker1:8083
          - http://my-kc.worker2:8083    
     sslKeystore:
        file: /path/to/my/keystore.jks
      sslKeystorePassword: 
        value: myPassword

Last updated

Logo

2024 © Lenses.io Ltd. Apache, Apache Kafka, Kafka and associated open source project names are trademarks of the Apache Software Foundation.