Kafka APIs

Kafka APIs

Apache Kafka includes five core APIs

1. Producer API

The Producer API allows applications to send streams of data to topics in the Kafka cluster. To use the producer API, we need to use the kafka-clients-<version>.jar.

2. Consumer API

The Consumer API allows applications to read streams of data from topics in the Kafka cluster. To use the consumer API, we need to use the kafka-clients-<version>.jar.

3. Streams API

The Streams API allows transforming streams of data from input topics to output topics. To use the Streams API, we need to use the kafka-streams-<version>.jar. When using Scala you may optionally include the kafka-streams-scala library.

4. Connect API

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. For example, a connector to a relational database might capture every change to a table.

5. AdminClient API

The AdminClient API supports managing and inspecting topics, brokers, acls, and other Kafka objects. To use the AdminClient API, we need to use the kafka-clients-<version>.jar.

Kafka APIs
Scroll to top