Spring
Why Spring
Overview Microservices Reactive Event Driven Cloud Web Applications Serverless Batch
Learn
Overview Quickstart Guides Blog
Projects
Overview Spring Boot Spring Framework Spring Cloud Spring Cloud Data Flow Spring Data Spring Integration Spring Batch Spring Security View all projects
  • DEVELOPMENT TOOLS
  • Spring Tools 4 Spring Initializr
    Academy
    Courses Get Certified
    Solutions
    Overview Spring Runtime Spring Consulting Spring Academy For Teams Security Advisories
    Community
    Overview Events Team
    Spring for Apache Kafka 3.2.8
      • Overview
      • What’s new?
      • Introduction
        • Quick Tour
      • Reference
        • Using Spring for Apache Kafka
          • Connecting to Kafka
          • Configuring Topics
          • Sending Messages
          • Receiving Messages
            • Message Listeners
            • Message Listener Containers
            • Manually Committing Offsets
            • Asynchronous @KafkaListener Return Types
            • @KafkaListener Annotation
            • Obtaining the Consumer group.id
            • Container Thread Naming
            • @KafkaListener as a Meta Annotation
            • @KafkaListener on a Class
            • @KafkaListener Attribute Modification
            • @KafkaListener Lifecycle Management
            • @KafkaListener @Payload Validation
            • Rebalancing Listeners
            • Enforcing Consumer Rebalance
            • Forwarding Listener Results using @SendTo
            • Filtering Messages
            • Retrying Deliveries
            • Starting @KafkaListeners in Sequence
            • Using KafkaTemplate to Receive
          • Listener Container Properties
          • Dynamically Creating Containers
          • Application Events
          • Topic/Partition Initial Offset
          • Seeking to a Specific Offset
          • Container factory
          • Thread Safety
          • Monitoring
          • Transactions
          • Exactly Once Semantics
          • Wiring Spring Beans into Producer/Consumer Interceptors
          • Producer Interceptor Managed in Spring
          • Pausing and Resuming Listener Containers
          • Pausing and Resuming Partitions on Listener Containers
          • Serialization, Deserialization, and Message Conversion
          • Message Headers
          • Null Payloads and Log Compaction of 'Tombstone' Records
          • Handling Exceptions
          • JAAS and Kerberos
        • Non-Blocking Retries
          • How the Pattern Works
          • Back Off Delay Precision
          • Configuration
          • Programmatic Construction
          • Features
          • Combining Blocking and Non-Blocking Retries
          • Accessing Delivery Attempts
          • Topic Naming
          • Multiple Listeners, Same Topic(s)
          • DLT Strategies
          • Specifying a ListenerContainerFactory
          • Accessing Topics' Information at Runtime
          • Changing KafkaBackOffException Logging Level
        • Apache Kafka Streams Support
        • Testing Applications
      • Tips, Tricks and Examples
      • Other Resources
      • Override Spring Boot Dependencies
      • Micrometer Observation Documentation
      • Native Images
      • Change History
    Edit this Page GitHub Project Stack Overflow

    For the latest stable version, please use Spring for Apache Kafka 3.3.5!

    • Spring for Apache Kafka
    • Introduction

    Introduction

    This first part of the reference documentation is a high-level overview of Spring for Apache Kafka and the underlying concepts and some code snippets that can help you get up and running as quickly as possible.

    What’s new? Quick Tour
    • Spring for Apache Kafka
      • 4.0.0-SNAPSHOT
      • 4.0.0-M2
      • 3.3.6-SNAPSHOT
      • 3.3.5current
      • 3.2.9-SNAPSHOT
      • 3.2.8
      • 3.1.11-SNAPSHOT
      • 3.1.10
    • Related Spring Documentation
      • Spring Boot
      • Spring Framework
      • Spring Cloud
        • Spring Cloud Build
        • Spring Cloud Bus
        • Spring Cloud Circuit Breaker
        • Spring Cloud Commons
        • Spring Cloud Config
        • Spring Cloud Consul
        • Spring Cloud Contract
        • Spring Cloud Function
        • Spring Cloud Gateway
        • Spring Cloud Kubernetes
        • Spring Cloud Netflix
        • Spring Cloud OpenFeign
        • Spring Cloud Stream
        • Spring Cloud Task
        • Spring Cloud Vault
        • Spring Cloud Zookeeper
      • Spring Data
        • Spring Data Cassandra
        • Spring Data Commons
        • Spring Data Couchbase
        • Spring Data Elasticsearch
        • Spring Data JPA
        • Spring Data KeyValue
        • Spring Data LDAP
        • Spring Data MongoDB
        • Spring Data Neo4j
        • Spring Data Redis
        • Spring Data JDBC & R2DBC
        • Spring Data REST
      • Spring Integration
      • Spring Batch
      • Spring Security
        • Spring Authorization Server
        • Spring LDAP
        • Spring Security Kerberos
        • Spring Session
        • Spring Vault
      • Spring AI
      • Spring AMQP
      • Spring CLI
      • Spring GraphQL
      • Spring for Apache Kafka
      • Spring Modulith
      • Spring for Apache Pulsar
      • Spring Shell
    • All Docs...
    Spring

    Copyright © 2005 - Broadcom. All Rights Reserved. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
    Terms of Use • Privacy • Trademark Guidelines • Thank you • Your California Privacy Rights • Cookie Settings

    Apache®, Apache Tomcat®, Apache Kafka®, Apache Cassandra™, and Apache Geode™ are trademarks or registered trademarks of the Apache Software Foundation in the United States and/or other countries. Java™, Java™ SE, Java™ EE, and OpenJDK™ are trademarks of Oracle and/or its affiliates. Kubernetes® is a registered trademark of the Linux Foundation in the United States and other countries. Linux® is the registered trademark of Linus Torvalds in the United States and other countries. Windows® and Microsoft® Azure are registered trademarks of Microsoft Corporation. “AWS” and “Amazon Web Services” are trademarks or registered trademarks of Amazon.com Inc. or its affiliates. All other trademarks and copyrights are property of their respective owners and are only mentioned for informative purposes. Other names may be trademarks of their respective owners.

    Search in all Spring Docs