messaging-kafka

Enforces Kafka topic naming, producer reliability, consumer offset, schema compatibility, and DLQ conventions.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/balajirags/aifsd-kit --skill messaging-kafka-balajirags
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: messaging-kafka
Source: https://github.com/balajirags/aifsd-kit/tree/main/docs/skills/messaging-kafka
Command: npx skills add https://github.com/balajirags/aifsd-kit --skill messaging-kafka-balajirags

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams building event-driven services on Kafka often ship inconsistent topic names, unreliable producers, unsafe consumer offset handling, and breaking schema changes that cause silent message loss or consumer failures. This Skill provides a concrete rule set that prevents those failure modes before code is written or reviewed. ## Core Features & Use Cases - Topic and Schema Conventions: Enforces domain.context.eventName.v1 topic naming and Schema Registry compatibility (BACKWARD/BACKWARD_TRANSITIVE) with safe schema evolution rules. - Producer and Consumer Reliability Rules: Mandates idempotent producers (enable.idempotence=true, acks=all), keyed records for ordering, manual offset commits, and idempotent consumer processing. - DLQ and Poison-Pill Handling: Requires every consumer to route unprocessable messages to a dead-letter topic instead of retrying forever, with Java/Spring Kafka code examples. - Use Case: When implementing a new Kafka consumer for order events, apply these rules to configure manual acknowledgment, route poison-pill messages to the DLQ, and propagate correlation IDs via message headers. ## Quick Start Apply the messaging-kafka rules to review my Kafka producer and consumer configuration for reliability and schema compatibility issues.

Frequently Asked Questions about messaging-kafka

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

FAQPage Schema
How do I configure a reliable Kafka producer in Java?

Enable idempotence with `enable.idempotence=true`, set `acks=all`, and bound `max.in.flight.requests.per.connection` to 5 or less. Always key records that have ordering requirements and never block on `.get()` after send; use callbacks instead.

How should Kafka consumers handle poison-pill messages?

Route poison-pill messages to a dead-letter topic and acknowledge them so they are not retried forever. Other transient exceptions should propagate to the container's retry and backoff error handler, with manual acknowledgment only after successful processing.

What Kafka topic naming convention should I use?

Use the pattern `domain.context.eventName.v1` and never embed environment names in the topic. Environments should be separate clusters or namespaces, and breaking changes require a version bump like `v2`.

Does Kafka Schema Registry support backward compatible schema evolution?

Yes, configure Schema Registry with `BACKWARD` or `BACKWARD_TRANSITIVE` compatibility using Avro or Protobuf. Evolve schemas only by adding optional fields with defaults; never remove or rename fields in place.

Why do Kafka consumers lose messages with auto-commit enabled?

Auto-commit advances offsets before processing completes, so a crash silently drops unprocessed messages. Use manual offset commits (`enable-auto-commit: false`) and acknowledge only after the handler finishes successfully.

When should I avoid long processing in a Kafka listener?

Avoid long blocking I/O per record when processing time can exceed `max.poll.interval.ms`, because it triggers a consumer rebalance. Switch to a batch listener or offload work so listener processing stays bounded.