Configure Confluent Cloud Clients

Confluent Cloud supports Java and librdkafka-based C clients. The clients are configured by using the Confluent Cloud CLI and cluster credentials.

Java Client

  1. Configure Confluent Cloud CLI by running the init command. This command creates a configuration file located at ~/.ccloud/config.

    ccloud init
    
  2. When prompted, enter the cluster information.

    Bootstrap broker list: <broker-list>
    API Key: <api-key-id>
    API Secret: <secret-access-key>
    

    Tip

    To find the cluster configuration information, navigate to the Management -> Clusters page, click the ellipses (...) on the right-hand side of your cluster name, and click Client config.

librdkafka-based C Clients

Confluent’s official Python, Golang, and .NET clients for Apache Kafka are all based on librdkafka, as are other community-supported clients such as node-rdkafka.

  1. Configure Confluent Cloud CLI by running the init command. This command creates a configuration file located at ~/.ccloud/config.

    ccloud init
    
  2. When prompted, enter the cluster information.

    bootstrap.servers=<broker-list>
    broker.version.fallback=0.10.0.0
    api.version.fallback.ms=0
    sasl.mechanisms=PLAIN
    security.protocol=SASL_SSL
    ssl.ca.location=/usr/local/etc/openssl/cert.pem
    sasl.username=<api-key-id>
    sasl.password=<secret-access-key>
    

    Tip

    To find the cluster configuration information, navigate to the Management -> Clusters page, click the ellipses (...) on the right-hand side of your cluster name, and click Client config. The bootstrap.servers, sasl.username, and sasl.password information is shown on the client config tab. The api.version.request, broker.version.fallback, and api.version.fallback.ms options instruct librdkafka to use the latest protocol version and not fallback to an older version.

    For more information about librdkafka and Apache Kafka version compatibility, see the documentation. For a complete list of the librdkafka configuration options, see the configuration documentation.