<a id="client-overview"></a>

# Build Streaming Applications on Confluent Cloud

Build real-time streaming applications on Confluent Cloud that can process,
and react to events from a wide range of sources. You can develop applications
using your preferred programming language and a Apache Kafka® client library.

This section provides the architectural patterns, best practices, and practical
examples you need to build and operate robust, scalable streaming applications.

## Where to start

* For high-level planning, see the [Architectural Considerations](architecture.md#ccloud-architecture)
  to understand the key design decisions for data governance, security, and
  scalability.
* To get started quickly, follow the [Client Quick Start](config-client.md#cloud-config-client)
  to configure and run your first application.
* For detailed guidance, explore the [Developer Guides](guides.md) and
  browse the code in the [Client Examples](examples-index.md#client-examples).

## Security and connection requirements

All connections to Confluent Cloud are encrypted using
[Transport Layer Security (TLS)](../security/encrypt/tls.md#manage-data-in-transit-with-tls) and
require specific client configurations for successful connection.

For comprehensive information about TLS encryption, SNI requirements, certificate
management, and client prerequisites, see [Client Configuration Properties](client-configs.md#client-producer-consumer-config-recs-cc).

<!-- WARNING: THIS IS A SHARED FILE AND THE SOURCE IS LOCATED IN DOCS-COMMON. DO NOT ADD TO ANY OTHER REPO. -->

You can use Apache Kafka® clients to write distributed applications and microservices
that read, write, and process streams of events in parallel, at scale, and in a
fault-tolerant manner, even those related to network problems or machine failures.

The Kafka client library provides functions, classes, and utilities that you can use to create Kafka
[producer](../_glossary.md#term-producer) clients and [consumer](../_glossary.md#term-consumer) clients using your choice of programming languages. The primary way to build
production-ready producers and consumers is by using a programming language and a Kafka client
library.

The official Confluent supported clients are:

* Java: The official Java client library supports the producer, consumer,
  Streams, and Connect APIs.
* [librdkafka](https://docs.confluent.io/platform/current/clients/librdkafka/html/md_INTRODUCTION.html):
  The librdkafka and the following derived clients libraries only support the
  admin, producer, and consumer APIs.
  * C/C++
  * Python
  * Go
  * .NET
  * JavaScript

When you use the official Confluent-supported clients, you get the same
enterprise-level support that you get with the rest of Confluent Cloud:

* The release cycle for Confluent-provided clients follow the Confluent Cloud release
  cycle, as opposed to the Kafka release cycle.
* Confluent Cloud maintenance fixes are provided for two years with
  Standard Support and three years with Confluent Platform Platinum and Confluent Cloud Premier Support after the initial
  release of a minor version.

Additional open-source and community-developed Kafka client libraries are
available for other programming languages. Some of these include Scala,
Ruby, Rust, PHP, and Elixir.

The core APIs in the Kafka client library are:

* Producer API: This API provides classes and methods for creating and sending
  messages to Kafka topics. It allows developers to specify message payloads,
  keys, and metadata and to control message delivery and acknowledgement.
* Consumer API: This API provides classes and methods for consuming messages
  from Kafka topics. It allows developers to subscribe to one or more topics,
  receive messages in batches or individually, and process messages using custom
  logic.
* Share Consumer API: This API provides classes and methods for the
  cooperative consumption of messages from Kafka topics using a shared
  subscription model. It allows multiple developers to distribute messages from
  the same partitions across a group of consumers, enabling concurrent
  processing and individual message acknowledgement without the partition
  limitations of the Consumer API.
* Streams API: This API provides a high-level abstraction for building real-time
  data processing applications that consume, transform, and produce data streams
  from Kafka topics.
* Connector API: This API provides a framework for building connectors that can
  transfer data between Kafka topics and external data systems, such as
  databases, message queues, and cloud storage services.
* Admin API: This API provides functions for managing Kafka topics, partitions,
  and configurations. It allows developers to create, delete, and update topics
  and retrieve metadata about Kafka clusters and brokers.

In addition to these core APIs, the Kafka client library includes various tools
and utilities for configuring and monitoring Kafka clients and clusters,
handling errors and exceptions, and optimizing client performance and
scalability.

<a id="java-client-guides"></a>

### Client guides

[![image](images/clients-java.png)](https://docs.confluent.io/kafka-clients/java/current/overview.html)

**Kafka Java Client**

[Docs](https://docs.confluent.io/kafka-clients/java/current/overview.html) | [Tutorial](https://developer.confluent.io/get-started/java) | [API](https://docs.confluent.io/platform/current/clients/javadocs/javadoc/index.html) | [GitHub](https://github.com/apache/kafka)

Java producer and consumer shipped with Apache Kafka.

[![image](images/clients-c++.png)](https://docs.confluent.io/kafka-clients/librdkafka/current/overview.html)

**Kafka C/C++ Client**

[Docs](https://docs.confluent.io/kafka-clients/librdkafka/current/overview.html) | [Tutorial](https://developer.confluent.io/get-started/c) | [API](https://docs.confluent.io/platform/current/clients/librdkafka/html/index.html) | [GitHub](https://github.com/edenhill/librdkafka)

librdkafka, a C/C++ library that offers a producer and a consumer for Kafka.

[![image](images/clients-python.png)](https://docs.confluent.io/kafka-clients/python/current/overview.html)

**Kafka Python Client**

[Docs](https://docs.confluent.io/kafka-clients/python/current/overview.html) | [Tutorial](https://developer.confluent.io/get-started/python) | [API](https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html) | [GitHub](https://github.com/confluentinc/confluent-kafka-python)

Python client that provides a high-level producer, consumer, and AdminClient.

[![image](images/clients-go.png)](https://docs.confluent.io/kafka-clients/go/current/overview.html)

**Kafka Go Client**

[Docs](https://docs.confluent.io/kafka-clients/go/current/overview.html) | [Tutorial](https://developer.confluent.io/get-started/go) | [API](https://pkg.go.dev/github.com/confluentinc/confluent-kafka-go/v2/kafka) | [GitHub](https://github.com/confluentinc/confluent-kafka-go/)

Go client that offers a producer and a consumer for Kafka.

[![image](images/clients-dotnet.png)](https://docs.confluent.io/kafka-clients/dotnet/current/overview.html)

**Kafka .NET Client**

[Docs](https://docs.confluent.io/kafka-clients/dotnet/current/overview.html) |  [Tutorial](https://developer.confluent.io/get-started/dotnet) | [API](https://docs.confluent.io/platform/current/clients/confluent-kafka-dotnet/_site/api/Confluent.Kafka.html) | [GitHub](https://github.com/confluentinc/confluent-kafka-dotnet)

.NET client that provides a high-level producer, consumer, and AdminClient.

[![image](images/clients-javascript.png)](https://docs.confluent.io/kafka-clients/javascript/current/overview.html)

**Kafka JavaScript Client**

[Docs](https://docs.confluent.io/kafka-clients/javascript/current/overview.html) |  [Tutorial](https://developer.confluent.io/get-started/nodejs) | [API](https://docs.confluent.io/platform/current/clients/confluent-kafka-javascript/docs/index.html) | [GitHub](https://github.com/confluentinc/confluent-kafka-javascript)

JavaScript client that provides a high-level producer, consumer, and AdminClient.

<a id="client-support-matrix"></a>

### Client versions and support

The following sections outline the support available for each client.

<a id="java-client-support"></a>

#### Java client support

The following matrix shows the support timeline as mentioned in the [Confluent Platform and Apache Kafka Compatibility](/platform/current/installation/versions-interoperability.html#cp-ak-compatibility) matrix.
The Kafka clients are available for download on the [org.apache.kafka/kafka-clients](https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients) site.

* The Kafka client version matches and maps to the version of Kafka that
  supports it. To learn more, see the [Apache Kafka Clients Maven Repository](https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients).
* Confluent supports Kafka clients included with new releases of Kafka in
  the interval before a corresponding Confluent Platform release, and when connecting to
  Confluent Cloud.

  For example, on May 1, 2024, Confluent would support Java clients 3.7.x even
  though the corresponding Confluent Platform release, 7.7.x would not be released on May 1,
  2024.
* When choosing which JDK to use with your client, you should use the newest long-term support (LTS) version unless you have a compelling architectural reason to do otherwise.

The following table lists the supported client versions:

| Kafka Java Client Version   | JDK Supported                        | Release Date      | Standard End of Support <sup>[1](#id12)</sup>   | Confluent Platform Platinum and Confluent Cloud Premier End of Support <sup>[2](#id13)</sup>   |
|-----------------------------|--------------------------------------|-------------------|-------------------------------------------------|------------------------------------------------------------------------------------------------|
| 4.3.x                       | 25, 21, 17, 11 <sup>[3](#id14)</sup> | May 22, 2026      | May 22, 2028                                    | May 22, 2029                                                                                   |
| 4.2.x                       | 25, 21, 17, 11 <sup>[3](#id14)</sup> | February 17, 2026 | February 17, 2028                               | February 17, 2029                                                                              |
| 4.1.x                       | 21, 17, 11 <sup>[3](#id14)</sup>     | October 15, 2025  | October 15, 2027                                | October 15, 2028                                                                               |
| 4.0.x                       | 21, 17, 11 <sup>[3](#id14)</sup>     | March 18, 2025    | March 18, 2027                                  | March 18, 2028                                                                                 |
| 3.9.x                       | 21, 17, 11, 8 <sup>[3](#id14)</sup>  | Feb 19, 2025      | Feb 19, 2027                                    | Feb 19, 2028                                                                                   |
| 3.8.x                       | 21, 17, 11, 8 <sup>[3](#id14)</sup>  | July 26, 2024     | July 26, 2026                                   | July 26, 2027                                                                                  |
| 3.7.x                       | 21, 17, 11, 8 <sup>[3](#id14)</sup>  | February 27, 2024 | February 27, 2026                               | February 27, 2027                                                                              |
| 3.6.x                       | 17, 11, 8 <sup>[3](#id14)</sup>      | October 11, 2023  | October 11, 2025                                | October 11, 2026                                                                               |
* <a id='id12'>**[1]**</a> The end of support date applies to the stated minor version, and all maintenance versions associated with that minor version. For example, support for Kafka 2.6.4 ended on September 24, 2022.
* <a id='id13'>**[2]**</a> The two year support policy is standard. End of support is extended one year for Confluent Platform Platinum and Confluent Cloud Premier support agreements.
* <a id='id14'>**[3]**</a> Java 8 has been removed in Confluent Platform 8.0. Java 11 is only supported for Kafka Streams and Kafka clients.

The following versions are no longer supported:

| Kafka Java Client Version   | Release Date       | Standard End of Support   | Confluent Platform Platinum and Confluent Cloud Premier End of Support   |
|-----------------------------|--------------------|---------------------------|--------------------------------------------------------------------------|
| 3.5.x                       | August 25, 2023    | August 25, 2025           | August 25, 2026                                                          |
| 3.4.x                       | May 4, 2023        | May 4, 2025               | May 4, 2026                                                              |
| 3.3.x                       | November 4, 2022   | November 4, 2024          | November 4, 2025                                                         |
| 3.2.x                       | July 6, 2022       | July 6, 2024              | July 6, 2025                                                             |
| 3.1.x                       | April 5, 2022      | April 5, 2024             | April 5, 2025                                                            |
| 3.0.x                       | October 27, 2021   | October 27, 2023          | October 27, 2024                                                         |
| 2.8.x                       | June 8, 2021       | June 8, 2023              | June 8, 2024                                                             |
| 2.7.x                       | February 9, 2021   | February 9, 2023          | February 9, 2024                                                         |
| 2.6.x                       | September 24, 2020 | September 24, 2022        | September 24, 2023                                                       |
| 2.5.x                       | April 24, 2020     | April 24, 2022            | April 24, 2023                                                           |
| 2.4.x                       | January 10, 2020   | January 10, 2022          | January 10, 2023                                                         |
| 2.3.x                       | July 19, 2019      | July 19, 2021             | July 19, 2022                                                            |
| 2.2.x                       | March 28, 2019     | March 28, 2021            | March 28, 2022                                                           |
| 2.1.x                       | December 14, 2018  | December 14, 2020         | December 14, 2021                                                        |
| 2.0.x                       | July 31, 2018      | July 31, 2020             | July 31, 2021                                                            |
| 1.1.x                       | April 16, 2018     | April 16, 2020            | April 16, 2021                                                           |

If your client’s version is not listed and your testing shows it runs, running it in production is a risk. Confluent does not support clients running unsupported versions. If you decide to risk continuing with an unsupported client version, you may find information and help in the Confluent Community.

<a id="librdkafka-and-derived-client-support"></a>

#### librdkafka and derived client support

librdkafka is an open source community project available at: [https://github.com/confluentinc/librdkafka](https://github.com/confluentinc/librdkafka).

Confluent maintains its own official, signed set of binaries for librdkafka,
available to you here: [https://packages.confluent.io/clients/](https://packages.confluent.io/clients/).

| Programming Language                                                                                   | Library Name                                                                                 | Documentation                                                                                         |
|--------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
| [C/C++ Client](/platform/current/clients/api-docs/librdkafka.html#librdkafka-api)                      | [librdkafka](https://github.com/confluentinc/librdkafka)                                     | [Kafka C/C++ Client](https://docs.confluent.io/clients-librdkafka/current/overview.html)              |
| [Go Client](/platform/current/clients/api-docs/confluent-kafka-go.html#go-api)                         | [confluent-kafka-go](https://github.com/confluentinc/confluent-kafka-go/)                    | [Kafka Go Client](https://docs.confluent.io/kafka-clients/go/current/overview.html)                   |
| [.NET Client](/platform/current/clients/api-docs/confluent-kafka-dotnet.html#dotnet-api)               | [Confluent.Kafka](https://github.com/confluentinc/confluent-kafka-dotnet)                    | [Kafka .NET Client](https://docs.confluent.io/clients-confluent-kafka-dotnet/current/overview.html)   |
| [Python Client](/platform/current/clients/api-docs/confluent-kafka-python.html#python-api)             | [confluent-kafka](https://github.com/confluentinc/confluent-kafka-python)                    | [Kafka Python Client](https://docs.confluent.io/clients-confluent-kafka-python/current/overview.html) |
| [JavaScript Client](/platform/current/clients/api-docs/confluent-kafka-javascript.html#javascript-api) | [@confluentinc/kafka-javascript](https://github.com/confluentinc/confluent-kafka-javascript) | [Kafka Javascript Client](https://docs.confluent.io/kafka-clients/javascript/current/overview.html)   |

| librdkafka Client Version   | Release Date       | Standard End of Support   | Confluent Platform Platinum and Confluent Cloud Premier End of Support   |
|-----------------------------|--------------------|---------------------------|--------------------------------------------------------------------------|
| 2.15.x                      | June 30, 2026      | June 30, 2028             | June 30, 2029                                                            |
| 2.14.x                      | April 2, 2026      | April 2, 2028             | April 2, 2029                                                            |
| 2.13.x                      | January 5, 2026    | January 5, 2028           | January 5, 2029                                                          |
| 2.12.x                      | October 8, 2025    | October 8, 2027           | October 8, 2028                                                          |
| 2.11.x                      | July 3, 2025       | July 3, 2027              | July 3, 2028                                                             |
| 2.10.x                      | April 17, 2025     | April 17, 2027            | April 17, 2028                                                           |
| 2.9.x <sup>[4](#id18)</sup> | April 1, 2025      | April 1, 2027             | April 1, 2028                                                            |
| 2.8.x                       | January 7, 2025    | January 7, 2027           | January 7, 2028                                                          |
| 2.7.x <sup>[4](#id18)</sup> | December 21, 2024  | December 21, 2026         | December 21, 2027                                                        |
| 2.6.x                       | October 10, 2024   | October 10, 2026          | October 10, 2027                                                         |
| 2.5.x                       | July 10, 2024      | July 10, 2026             | July 10, 2027                                                            |
| 2.4.x                       | May 7, 2024        | May 7, 2026               | May 7, 2027                                                              |
| 2.3.x                       | October 25, 2023   | October 25, 2025          | October 25, 2026                                                         |
| 2.2.x                       | July 12, 2023      | July 12, 2025             | July 12, 2026                                                            |
| 2.1.x                       | April 6, 2023      | April 6, 2025             | April 6, 2026                                                            |
| 2.0.x                       | January 18, 2023   | January 18, 2025          | January 18, 2026                                                         |
| 1.9.x                       | June 16, 2022      | June 16, 2024             | June 16, 2025                                                            |
| 1.8.x                       | September 16, 2021 | September 16, 2023        | September 16, 2024                                                       |
| 1.7.x                       | May 10, 2021       | May 10, 2023              | May 10, 2024                                                             |
| 1.6.x                       | January 26, 2021   | January 26, 2023          | January 26, 2024                                                         |
* <a id='id18'>**[4]**</a> For this release, changes were only made to the dependent clients, not to librdkafka.
- An end-of-support date is based on the first release of the specified minor
  version. The support date windows apply to that minor version and any
  maintenance/patch versions that come under the minor version. For example,
  1.9.0 and 1.9.1 would have the same support windows as specified for 1.9.x.
- The two-year support policy is standard. End of support is extended one year
  for Platinum support agreements.

#### Client examples

To learn how to build Kafka clients apps using your favorite language, including Java, .NET, Python, JavaScript, C/C++, and
Go, see [Kafka Client Examples for Confluent Cloud](examples-index.md#client-examples).

#### NOTE
Confluent recommends upgrading to the latest client since current
fixes are generally not found in older clients.

<!-- WARNING: THIS IS A SHARED FILE AND THE SOURCE IS LOCATED IN DOCS-COMMON. DO NOT ADD TO ANY OTHER REPO. -->

<a id="choosing-consumer-types"></a>

### Choosing consumer types

Choose between consumers in consumer groups and share consumers in share groups
based on your application requirements. Consumer groups provide message ordering
using partition assignment. Share groups enable multiple share consumers to
process messages from the same partition in parallel with per-message
acknowledgement, providing queue-like semantics for task-based workloads.

#### Key differences

| Feature                     | Consumers and consumer groups                                       | Share consumers and share groups                                    |
|-----------------------------|---------------------------------------------------------------------|---------------------------------------------------------------------|
| Per-message acknowledgement | Not available                                                       | Accept, reject, or renew                                            |
| Ordering                    | Strict ordering within each partition                               | Not guaranteed                                                      |
| Scaling                     | 1:1 consumer-to-topic partition requirement; scales with partitions | 1:many share consumers-to-topic partitions; scale beyond partitions |
| Message processing          | Sequential within partition                                         | Parallel within partition                                           |
| Typical use                 | Stream processing, analytics, ETL pipelines                         | Task queue processing, operational workloads                        |

#### When to use consumer groups

Use consumer groups for streaming applications that require ordered processing:

- Processing messages from a partition in order.
- Continuous processing of data streams with stateful operations.
- Building ETL pipelines, data synchronization, or materialized views.
- Performing aggregations, windowing, or time-series analysis.
- Using KStreams, Flink, or other stream processing frameworks.

For applications where you want explicit control over partition assignment and
offset management, you can use manual partition assignment using the `assign()`
API. The `group.id` configuration is optional.

#### When to use share groups

Use share groups for messaging workloads:

- Acknowledging processing of individual messages.
- Processing messages with multiple consumers from the same partition in parallel.
- Scaling consumers dynamically without scaling parititions.
- Using operational workloads like command invocation, service communication, or task execution.
- Processing independent tasks in parallel.

Share groups provide queue-like semantics, ideal for independent tasks that
can be processed in any order.
