Open-source project
spring-projects/spring-kafka avatar
spring-projects/spring-kafka

Spring for Apache Kafka ships three release lines at once, and its README is a build-and-contribute guide, not a usage guide

Provides Familiar Spring Abstractions for Apache Kafka

2,523 stars1,802 forksJavaApache-2.0

At a glance

What is it?
spring-projects/spring-kafka provides Spring abstractions for Apache Kafka. Tags v4.2.0-RC1, v4.1.2 and v4.0.8 landed within seconds of each other on 22 October 2026, and the README covers Gradle builds, DCO sign-off and support channels, with usage left to the reference manual.
Who is it for?
Adopt spring-kafka if your services already run on Spring and you want Kafka access in Spring's own idiom, and send questions to the spring-kafka tag on Stack Overflow with a minimal reproducible example. Look at the plain Kafka client instead if you do not use Spring at all.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Java, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 26, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • spring-projects/spring-kafka2,523 ★ · +10
Star history
Repository2026-10-082026-11-26
spring-projects/spring-kafka2.5k2.5k

10 Stars in the last 49 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Three tags in the same few seconds: 4.0.8, 4.1.2 and 4.2.0-RC1 are maintained side by side

The three most recent releases carry nearly identical timestamps on 22 October 2026: v4.2.0-RC1, v4.1.2 and v4.0.8, published within eight seconds of each other. That pattern means a single release run cut a release candidate for the next minor version and patch releases for two older lines.

For a reader choosing a version, the consequence is practical. Two stable lines are receiving fixes, and a third is in release-candidate state. The last push to the repository was on 24 October 2026.

The description is short: it provides familiar Spring abstractions for Apache Kafka. Nothing in the README states which Spring Framework or Kafka client version each line needs. That information is not in the build instructions, so read the reference manual before you move between lines, because a minor-version jump can change what else you must upgrade.

The README tells you how to build the project, not how to produce or consume a message

Spring for Apache Kafka is a library, and a reader arriving from a search for a consumer example or a dependency snippet will not find one in the README. It covers checking out the code, building it, IDE setup, contributing and support. The only pointer to usage is the Reference Manual at `docs.spring.io/spring-kafka/reference/index.html`.

That gap is worth knowing about. The README gives no Maven or Gradle dependency coordinates, no configuration property names, and no listener or consumer example. If you want to use the library in an application, the manual is the document, and the `samples/` directory is the other source: it holds eight numbered folders, `sample-01` through `sample-08`, with a `samples/README.adoc` explaining them.

The README's own scope is about contributors and people who want a local build of the library.

The consequence for a newcomer is a two-step reading order. Open the reference manual to learn what the abstractions are called and how they are configured, then read a sample project to see them wired together in code. Use the README only when you need to build the jars yourself, generate IDE metadata or follow the contribution rules. A reader who treats the README as the tutorial will come away with Gradle commands and no Kafka code.

Building from source: Java 17 or later, then four Gradle outputs

The README's build steps start with a clone:

code
git clone git://github.com/spring-projects/spring-kafka.git
cd spring-kafka
./gradlew build

Java 17 or a later version is recommended to build the project. If you hit out of memory errors during the build, change the `org.gradle.jvmargs` property in `gradle.properties`.

Four more tasks produce specific outputs. `./gradlew install` builds and installs jars into your local Maven cache. `./gradlew api` builds the API Javadoc into `build/api`. `./gradlew antora` builds the reference documentation into `spring-kafka-docs/build/site`. `./gradlew dist` builds the complete distribution including the `-dist`, `-docs` and `-schema` zip files into `build/distributions`.

The `install` task is the one to use if you want to test a local change against another project on your machine, since the other project can then resolve the jar from the local Maven cache.

Modules in the tree: library, test support, a BOM, documentation and eight samples

The top level shows how the project is divided. `spring-kafka/` is the library. `spring-kafka-test/` is a separate module for test support. `spring-kafka-bom/` is a bill of materials, `spring-kafka-docs/` holds the reference documentation that Antora builds, and `samples/` holds the examples.

Build logic sits in `build.gradle`, `settings.gradle`, `gradle.properties`, `publish-maven.gradle` and `commercial-settings.gradle`, and a Gradle wrapper (`gradlew` and `gradlew.bat`) is checked in, so you do not need Gradle installed.

Two files stand out in a modern repository: `AGENTS.md` and `CLAUDE.md` sit next to `CONTRIBUTING.md`. The README does not describe them, so read `CONTRIBUTING.md` first if you plan to open a pull request. The BOM module is the place to look for aligned versions, but the README does not describe its contents.

Contributing requires a Signed-off-by line, and the old CLA is gone

Every commit must include a Signed-off-by trailer at the end of the commit message, which indicates that the contributor agrees to the Developer Certificate of Origin. The README links the blog post titled Hello DCO, Goodbye CLA, which marks the change from a contributor license agreement. The DCO does not grant commit rights to the main repository, but it lets the team accept your contributions and give you author credit. Active contributors might be asked to join the core team and merge pull requests.

A pull request should reference a GitHub issue covering the specific problem. The housekeeping list is described as helpful but not essential: use the Spring Framework code format by importing `eclipse-code-formatter.xml`, put a Javadoc class comment with an `@author` tag on every new `.java` file, add the ASF license header, add yourself as author to files you change substantially, and add Javadocs and XSD doc elements if you change the namespace.

Unit tests are welcome, and the README says someone has to write them. If no one else uses your branch, rebase it against the current main.

Support goes through the spring-kafka tag on Stack Overflow, and commercial support is separate

For questions, the README points to the `spring-kafka` tag on Stack Overflow. It asks you to include code and configuration, to explain the problem clearly, and to provide a minimal reproducible example when possible. Commercial support is available through spring.io/support.

Bugs and feature requests go to GitHub issues. Security problems follow the security policy rather than a public issue, and the repository points to the Spring project's code of conduct.

This support model has a limit. The README names no chat channel or mailing list, so the answer to a configuration question comes from Stack Overflow or the reference manual, and the issue tracker is meant for bugs and feature requests. A question posted as an issue is off topic under that split.

The MCRE request deserves attention. A minimal reproducible example, linked from the README to the Stack Overflow help page, means a stripped project with the smallest configuration that still shows the problem. Questions that arrive without one are harder to answer, because the answerer cannot see your listener setup or your broker settings. For IDE setup, `./gradlew eclipse` generates `.classpath` and `.project` files for import through File, Import, Existing projects into workspace, and `./gradlew idea` generates `.iml` and `.ipr` files.

A licence filename mismatch: the README links LICENSE.txt and the file is LICENCE.txt

Spring Kafka is released under the Apache Software License Version 2.0. The README links to `LICENSE.txt`, while the top-level listing shows the file as `LICENCE.txt`, spelled with a C. The link text and the file name do not match, so the link may not resolve from the README page. The license itself is not in doubt, since the repository metadata reports Apache-2.0.

The contribution notes ask for the ASF license header on every new `.java` file, copied from existing files.

For anyone auditing dependencies, the practical point is simple. Apache-2.0 allows commercial use, and the repository also carries `commercial-settings.gradle`, which concerns the build and not the licence. The README does not explain what that file configures.

Editorial conclusion

Adopt spring-kafka if your services already run on Spring and you want Kafka access in Spring's own idiom, and send questions to the spring-kafka tag on Stack Overflow with a minimal reproducible example. Look at the plain Kafka client instead if you do not use Spring at all. Before choosing a version, compare the three active lines, 4.0.x, 4.1.x and the 4.2.0 release candidate, against the Spring Framework and Kafka client versions in your reference manual.

Frequently asked questions

What is Spring Kafka?

Spring for Apache Kafka provides familiar Spring abstractions for Apache Kafka. Usage is documented in the Reference Manual on docs.spring.io, and the repository includes eight sample projects.

What is the current version of Spring Kafka?

The most recent releases are v4.2.0-RC1, v4.1.2 and v4.0.8, all tagged on 22 October 2026. The 4.2.0 line is a release candidate, so 4.1.2 and 4.0.8 are the patch releases.

How to use Spring Kafka?

Start from the Reference Manual at docs.spring.io/spring-kafka/reference/index.html and the samples directory in the repository. The README itself covers building and contributing, not usage.

What are the key differences between Apache Kafka and Spring Kafka?

Apache Kafka is the event streaming platform. Spring Kafka is a separate project that provides Spring abstractions for working with it, built with Gradle and released under Apache-2.0.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. spring-projects/spring-kafka on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/spring-projects-spring-kafka.svg)](https://hysenlabs.com/projects/spring-projects-spring-kafka)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/spring-projects-spring-kafka.svg)](https://hysenlabs.com/projects/spring-projects-spring-kafka)

Was this useful?