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 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.1.4
    • 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
          • @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
  • Spring for Apache Kafka
  • Reference
  • Using Spring for Apache Kafka

Using Spring for Apache Kafka

This section offers detailed explanations of the various concerns that impact using Spring for Apache Kafka. For a quick but less detailed introduction, see Quick Tour.

Section Summary

  • Connecting to Kafka
  • Configuring Topics
  • Sending Messages
  • Receiving Messages
  • 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
Reference Connecting to Kafka
  • Spring for Apache Kafka
    • 3.1.4current
  • Related Spring Documentation
    • Spring Framework
    • Spring Data
      • Spring Data Commons
      • Spring Data JPA
    • Spring Integration
    • Spring Security
      • Spring LDAP
      • Spring Session
      • Spring Authorization Server
      • Spring Vault
      • Spring Security Kerberos
    • Spring AI
    • Spring CLI
    • Spring GraphQL
    • Spring Shell
Spring

© VMware, Inc. or its affiliates. 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.