Spring for Apache Kafka3.3.0

The Spring for Apache Kafka (spring-kafka) project applies core Spring concepts to the development of Kafka-based messaging solutions. It provides a "template" as a high-level abstraction for sending messages. It also provides support for Message-driven POJOs with @KafkaListener annotations and a "listener container". These libraries promote the use of dependency injection and declarative. In all of these cases, you will see similarities to the JMS support in the Spring Framework and RabbitMQ support in Spring AMQP.

Features

  • KafkaTemplate

  • KafkaMessageListenerContainer

  • @KafkaListener

  • KafkaTransactionManager

  • spring-kafka-test jar with embedded kafka server

Kafka Client and Spring Boot Compatibility

Use the support tab above for information about supported versions.

Spring for Apache Kafka is based on the pure java kafka-clients jar. The following is the compatibility matrix:

Spring for Apache Kafka Version Spring Integration for Apache Kafka Version kafka-clients Spring Boot
3.2.x 6.3.x 3.7.0 3.3.x
3.1.x 6.2.x 3.6.0 3.2.x
3.0.x 6.0.x/6.1.x 3.3.2 to 3.6.0 3.0.x/3.1.x
2.9.x 5.5.x 3.2.3 to 3.6.0 2.7.x (not managed)
2.8.x 5.5.x 3.0.0 2.6.x or 2.7.x (End of Life)
2.7.x 5.5.x 2.7.0 - 2.8.1 2.4.x or 2.5.x (End of Life)
2.6.x 5.3.x or 5.4.x 2.6.0 - 2.8.1 2.3.x or 2.4.x (End of Life)
2.5.x 3.3.x 2.5.1 - 2.8.1 2.3.x (End of Life)
2.4.x 3.2.x 2.4.1 2.2.x (End of Life)
2.3.x 3.2.x 2.3.1 2.2.x (End of Life)
2.2.x 3.1.x 2.0.1, 2.1.x, 2.2.x 2.1.x (End of Life)
2.1.x 3.0.x 1.0.2 2.0.x (End of Life)
1.3.x 2.3.x 0.11.0.x, 1.0.x 1.5.x (End of Life)

IMPORTANT: This matrix is client compatibility; for a complete discussion about client/broker compatibility, see the Kafka Compatibility Matrix

  • Spring Integration Kafka versions prior to 2.0 pre-dated the Spring for Apache Kafka project and therefore were not based on it.

These versions will be referenced transitively when using maven or gradle for version management.

  • Spring Boot 1.5 (EOL) users should use 1.3.x (Boot dependency management will use 1.1.x by default so this should be overridden).

  • Spring Boot 2.1 (EOL) users should use 2.2.x (Boot dependency management will use the correct version).

  • Spring Boot 2.2 (EOL) users should use 2.3.x (Boot dependency management will use the correct version, or override version to 2.4.x).

  • Spring Boot 2.3 (EOL) users should use 2.5.x (Boot dependency management will use the correct version, or override version to 2.6.x).

  • Spring Boot 2.4 (EOL) users should use 2.6.x (Boot dependency management will use the correct version, or override version to 2.7.x).

  • Spring Boot 2.5 (EOL) users should use 2.7.x (Boot dependency management will use the correct version).

  • Spring Boot 2.6 users should use 2.8.x (Boot dependency management will use the correct version).

  • Spring Boot 2.7 users should use 2.8.x, or 2.9.x (Boot dependency management will use the 2.8.x version).

To use 2.9.x with Boot 2.7.x; see Override Spring Boot Dependencies.

  • Spring Boot 3.0.x uses kafka-clients 3.3.2

  • Spring Boot 3.1.x uses kafka-clients 3.4.1

Spring Boot Supported Versions.

Spring Initializr

Quickstart Your Project

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all