Connecting Clients to Confluent Cloud¶
You can write Kafka client applications to connect to Confluent Cloud in pretty much any language of your choosing. The clients just need to be configured using the Confluent Cloud cluster credentials.
Refer to Code Examples for client examples written in the following programming languages and tools. These “Hello, World!” examples produce to and consume from any Kafka cluster, including Confluent Cloud, and for the subset of languages that support it, there are additional examples using Confluent Cloud Schema Registry and Avro.
- Before connecting a client application to Confluent Cloud, increase the timeout for API version requests
from the default value of 10 seconds. You can change this with librdkafka
api.version.request.timeout.msparameter. For more information, see the librdkafka configuration documentation.
- Depending on your operating system and configuration, you might have to specify the location of your client
config for SSL (
ssl.ca.location). For example, if your OS does not provide root CA certificates, or if the certificates are stored in a non-standard location.
- Before connecting a client application to Confluent Cloud, increase the timeout for API version requests from the default value of 10 seconds. You can change this with librdkafka
To connect librdkafka-based clients, specifically C/C++, .Net, Python, and Go clients, to Confluent Cloud over SSL/TLS, you need Let’s Encrypt CA certificates locally. By default, certificates do not come with RHEL or CENTOS. You must download the certificates if your librdkafka-based client runs on RHEL or CENTOS.
To learn how to architect, monitor, and optimize your Kafka applications on Confluent Cloud, refer to Developing Client Applications on Confluent Cloud.
If you are using Confluent Cloud on Azure, you must change the default Kafka timeout from
metadata.max.age.ms=210000. This is because the Azure
LoadBalancer timeouts are set to
Connecting to Confluent Cloud from a .NET Application¶
You can configure the Confluent .NET Client for Kafka to connect to a Kafka cluster in Confluent Cloud.
Connecting to Confluent Cloud from a Go Application¶
You can configure the Confluent Golang Client for Kafka to connect to a Kafka cluster in Confluent Cloud.
Install the Confluent Golang Client for Apache Kafka.
The Confluent Golang Client for Kafka depends on librdkafka, which must be installed separately.
Customize the Golang Confluent Cloud example for your Confluent Cloud cluster, specifically
Integrate with your environment.
Connecting to Confluent Cloud from a Python Application¶
You can configure the Confluent Python Client for Kafka to connect to a Kafka cluster in Confluent Cloud.
Examples and Demo¶
- To view a working example of hybrid Apache Kafka® clusters from self-hosted to Confluent Cloud, see the Confluent Cloud demo.
- For example configs for all Confluent Platform components and clients connecting to Confluent Cloud, see template examples for components.
- To find additional Confluent Cloud demos, see Confluent Cloud Demos.
- For a practical guide to configuring, monitoring, and optimizing your Kafka client applications, see Developing Client Applications on Confluent Cloud.