Connecting Apache Kafka® Clients to Confluent Cloud¶
The confluentinc/examples GitHub repo provides hello world examples of Kafka clients connecting to Confluent Cloud in many different programming languages, including Java, Python, Go, Scala, Confluent CLI, Ruby, Groovy, Kotlin, Node, kafkacat, .NET, C, Clojure, and others. All the examples include a producer and consumer, and where relevant, Avro data with Confluent Cloud Schema Registry.
- Prerequisites:
- Before connecting a client application to Confluent Cloud, you should increase the timeout for API version requests
from the default value of 10 seconds. You can change this with librdkafka
api.version.request.timeout.ms
parameter. 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, you should increase the timeout for API version requests
from the default value of 10 seconds. You can change this with librdkafka
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.
- Install the Confluent .NET Client for Apache Kafka.
- Customize the .NET Confluent Cloud example
for your Confluent Cloud cluster, specifically
bootstrap.servers
,sasl.username
, andsasl.password
. - Integrate with your environment.
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.
Important
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
bootstrap.servers
,sasl.username
, andsasl.password
.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.
- Install the Confluent Python Client for Apache Kafka.
- Customize the Python Confluent Cloud example
for your Confluent Cloud cluster, specifically
bootstrap.servers
,sasl.username
, andsasl.password
. - Integrate with your environment.
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 look at all the code used in the Confluent Cloud demo, see the Confluent Cloud demo examples.