spring-kafka

Configure Spring Boot Kafka producers and consumers with retries and dead-letter topics.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/dprice-dev/claude-java-skills --skill spring-kafka-dprice-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: spring-kafka
Source: https://github.com/dprice-dev/claude-java-skills/tree/main/.claude/skills/spring-kafka
Command: npx skills add https://github.com/dprice-dev/claude-java-skills --skill spring-kafka-dprice-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It solves the problem of building dependable event streaming in Spring Boot by handling producer/consumer wiring, message reliability, retries, and dead-letter routing so that asynchronous processing doesn’t silently lose or corrupt work.

Core Features & Use Cases

  • Producer publishing with reliability: Configure Kafka producers with idempotence, acknowledgements, and structured send patterns for publishing domain events.
  • Consumer processing with safe acknowledgement: Implement @KafkaListener consumers with manual ack so messages are only acknowledged after successful processing.
  • Retry + dead-letter topics (DLT): Add robust error handling using exponential backoff retries and automatic routing to a .DLT topic for non-retryable failures.
  • Testcontainers-based Kafka integration tests: Run Kafka-based tests with embedded/containerized Kafka to validate end-to-end behavior.
  • Schema evolution guidance (Avro-ready model patterns): Support versioned event records and consumer tolerance rules for evolving schemas over time.

Quick Start

Use the spring-kafka skill to generate a producer and a @KafkaListener consumer for an event like OrderPlaced, including manual acknowledgements, retry/backoff error handling, and dead-letter topic configuration.

Frequently Asked Questions about spring-kafka

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure a Spring Boot Kafka consumer with manual ack and retry?▼

Spring Boot Kafka consumers use @KafkaListener with manual acknowledgement semantics to ensure messages are only acknowledged after successful processing, paired with exponential backoff retries and dead-letter topic routing for non-retryable failures.

What is the best way to handle Kafka dead-letter topics in Spring Boot?▼

Kafka dead-letter topics in Spring Boot handle non-retryable failures by automatically routing messages to a .DLT topic after exhausting exponential backoff retries, ensuring asynchronous processing doesn't silently lose or corrupt work.

How do I test Kafka listeners and producers using Testcontainers?▼

Kafka Testcontainers integration testing validates end-to-end producer and consumer behavior by running Kafka-based tests with embedded or containerized Kafka instances to ensure reliable event streaming.

Can I use Avro schema evolution with Spring Kafka event streaming?▼

Spring Kafka supports Avro-ready schema evolution by applying versioned event records and consumer tolerance rules, allowing evolving schemas to be managed over time without breaking domain event publishing workflows.

How do I configure idempotent Kafka producers in Spring Boot?▼

Kafka producers in Spring Boot are configured with idempotence and acknowledgements alongside structured send patterns via KafkaTemplate, ensuring reliable domain event publishing for service-to-service asynchronous processing.