Chapter 10. Kafka clients
The kafka-clients
JAR file contains the Kafka Producer and Consumer APIs together with the Kafka AdminClient API.
- The Producer API allows applications to send data to a Kafka broker.
- The Consumer API allows applications to consume data from a Kafka broker.
- The AdminClient API provides functionality for managing Kafka clusters, including topics, brokers, and other components.
10.1. Adding Kafka clients as a dependency to your Maven project Copy linkLink copied to clipboard!
This procedure shows you how to add the AMQ Streams Java clients as a dependency to your Maven project.
Prerequisites
-
A Maven project with an existing
pom.xml
.
Procedure
Add the Red Hat Maven repository to the
<repositories>
section of yourpom.xml
file.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add the clients to the
<dependencies>
section of yourpom.xml
file.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Build your Maven project.