kafka-patterns

Implement Spring Kafka messaging patterns with DLQ, retry logic, and Testcontainers-based integration tests.

1|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/kssumin/claude-playground --skill kafka-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kafka-patterns
Source: https://github.com/kssumin/claude-playground/tree/main/.claude/skills/kafka-patterns
Command: npx skills add https://github.com/kssumin/claude-playground --skill kafka-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Solves the challenge of implementing reliable Kafka-based messaging patterns.

Core Features & Use Cases

  • Producer/Consumer guidance: design and implement reliable producers and listeners with idempotence, acks, batch settings, and manual commit strategies.
  • Dead Letter Queue (DLQ) workflow: three-stage handling (work -> retry -> dead) with partitioning and headers for retry counts.
  • Testing & deployment: Testcontainers-based tests, automatic topic creation, and Spring configuration to simplify integration testing.

Quick Start

Configure your Spring Kafka project with the provided properties and run the Testcontainers-based tests to verify DLQ behavior.

Frequently Asked Questions about kafka-patterns

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

FAQPage Schema
How do I implement a Dead Letter Queue in Spring Kafka?

Implement a Dead Letter Queue in Spring Kafka using a three-stage workflow: work, retry, and dead topics. Partition these topics and include headers for retry counts to track and isolate failed messages effectively.

How do I configure reliable Kafka producers and consumers with manual commits?

Configure reliable Kafka producers and consumers by setting idempotence, acks, and batch parameters for producers, while implementing manual commit strategies and specific listener behaviors for consumers to ensure message processing integrity.

How do I test Kafka DLQ behavior using Testcontainers?

Test Kafka DLQ behavior using Testcontainers by configuring your Spring Kafka project with the provided properties and running containerized integration tests to automatically create topics and verify message retry and dead-letter routing.

What is the best way to design Kafka topics for a retry workflow?

Design Kafka topics for a retry workflow by creating separate work, retry, and dead topics. Apply partitioning across these topics and attach headers containing retry counts to manage message progression through the retry stages.

Does this Kafka pattern reference require specific topic creation settings for integration testing?

Integration testing requires automatic topic creation enabled through Spring configuration. This setup simplifies verifying Kafka consumer and producer behavior alongside Testcontainers without needing manual topic provisioning.

Why does my Kafka consumer need idempotence and acks settings for production?

Kafka consumers and producers need idempotence and acks settings to prevent duplicate messages and data loss during network partitions. These configurations ensure reliable message delivery in production-grade Spring Kafka setups.