On this page
Overview
Spring for Apache Kafka wraps the Apache Kafka client in Spring-oriented APIs. It provides KafkaTemplate, @KafkaListener, listener containers, error handlers, transactions, non-blocking retry, Kafka Streams integration, and testing utilities.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Build producers and consumers with KafkaTemplate and @KafkaListener
The core module provides KafkaTemplate, @KafkaListener, single- and multi-threaded listener containers, KafkaAdmin, producer factories, and consumer factories.
Sources: [2]
Integrate retry topics, transactions, and test utilities
The project includes @RetryableTopic for non-blocking retries and dead-letter routing, KafkaTransactionManager support, EmbeddedKafkaBroker, and JUnit-oriented test utilities.
Sources: [2]
Best fit
Before adoption
Design retry, acknowledgment, and transaction behavior as a delivery policy
Listener containers, AckMode, error handlers, retry topics, and transactions offer multiple delivery choices, so applications should define at-least-once handling, idempotency, and DLT policies explicitly.
Sources: [2]
Version 4.1.1 includes CVE fixes for Kafka header handling
The v4.1.1 release hardens retry/backoff timestamp headers, restricts certain java.net types in header type mapping, and includes fixes for issues such as records being lost during retry.
Sources: [3]
Official sources
- [1]Spring Kafka README(2026-10-06)
- [2]Spring Kafka module structure(2026-10-06)
- [3]Spring Kafka v4.1.1 release(2026-10-06)
Supplemental curator note
It fits Spring Boot and Kotlin services that want Kafka producers and consumers integrated with Spring configuration and error handling. Version 4.1.1 includes CVE fixes around Kafka header handling.
Try it in 3 steps
- 1
Get the source
git clone --depth 1 https://github.com/spring-projects/spring-kafka.git - 2
Enter the repository
cd spring-kafka - 3
Check the official steps
Continue with the commands in the README Installation, Quick Start, or Getting Started section.
find . -maxdepth 1 -iname 'README*' -exec sed -n '1,220p' {} \; -quit
Growth
Growth trends · Last 30 days
2,512 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 61
- Open PRs
- 9
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
- Stars
- 2,512
- Forks
- 1,770
- Watchers
- 148
- Open issues
- 30
- Contributors
- 274
- Owner type
- Organization
- Primary language
- Java
- License
- Apache-2.0
- Repository last updated
- Oct 6, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Kotlin53,479 Stars
2 shared tag(s)
keep Java interoperability while extending one language from JVM to Android, iOS, desktop, and web
Kotlin - Spring Data JPA3,287 Stars
4 shared tag(s) · 1 shared category(s) · Same language
derive JPA CRUD, finder, pagination, and auditing behavior from repository interfaces
Java - Spring Data Redis1,874 Stars
4 shared tag(s) · 1 shared category(s) · Same language
integrate Redis into Spring through templates, repositories, Pub/Sub, and reactive APIs
Java - Kotlin JDSL825 Stars
3 shared tag(s) · 1 shared category(s)
build JPA queries from ordinary Kotlin classes without generated metamodels
Kotlin - Spring Boot81,561 Stars
3 shared tag(s) · Same language
put Spring application assembly and operations on a common foundation
Java - Dagger17,702 Stars
2 shared tag(s) · 1 shared category(s) · Same language
build Java and Android dependency-injection graphs with compile-time code generation and no runtime reflection
Java
Report incorrect information
Tell us if any listing information is incorrect or outdated.