Getting Started · Beginner
Maven/Gradle Dependencies
Add spring-kafka to your project. It transitively brings in kafka-clients. No explicit kafka-clients version needed — spring-kafka manages it.
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
<!-- Version managed by Spring Boot parent -->
</dependency>
<!-- For Avro + Schema Registry (optional) -->
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-avro-serializer</artifactId>
<version>7.5.0</version>
</dependency>dependencies {
implementation 'org.springframework.kafka:spring-kafka'
// Test utilities (embedded broker)
testImplementation 'org.springframework.kafka:spring-kafka-test'
}