docs/apis/_index.md
Kafka includes six core apis:
The Producer API allows applications to send streams of data to topics in the Kafka cluster.
Examples of using the producer are shown in the javadocs.
To use the producer, add the following Maven dependency to your project:
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>4.3.0</version>
</dependency>
The Consumer API allows applications to read streams of data from topics in the Kafka cluster.
Examples of using the consumer are shown in the javadocs.
To use the consumer, add the following Maven dependency to your project:
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>4.3.0</version>
</dependency>
The Share Consumer API enables applications in a share group to cooperatively consume and process data from Kafka topics.
Examples of using the share consumer are shown in the javadocs.
To use the share consumer, add the following Maven dependency to your project:
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>4.3.0</version>
</dependency>
The Streams API allows transforming streams of data from input topics to output topics.
Examples of using this library are shown in the javadocs.
Additional documentation on using the Streams API is available here.
To use Kafka Streams, add the following Maven dependency to your project:
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams</artifactId>
<version>4.3.0</version>
</dependency>
When using Scala you may optionally include the kafka-streams-scala library. Additional documentation on using the Kafka Streams DSL for Scala is available in the developer guide.
To use Kafka Streams DSL for Scala 2.13, add the following Maven dependency to your project:
⚠️ DEPRECATION NOTICE: The
kafka-streams-scalalibrary is deprecated as of Kafka 4.3 and will be removed in Kafka 5.0. Please migrate to using the Java Streams API directly from Scala. See the migration guide for details.
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams-scala_2.13</artifactId>
<version>4.3.0</version>
</dependency>
The Connect API allows implementing connectors that continually pull from some source data system into Kafka or push from Kafka into some sink data system.
Many users of Connect won't need to use this API directly, though, they can use pre-built connectors without needing to write any code. Additional information on using Connect is available here.
Those who want to implement custom connectors can see the javadoc.
The Admin API supports managing and inspecting topics, brokers, acls, and other Kafka objects.
To use the Admin API, add the following Maven dependency to your project:
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>4.3.0</version>
</dependency>
For more information about the Admin APIs, see the javadoc.