home / skills / jeremylongshore / claude-code-plugins-plus-skills / kafka-producer-consumer

This skill helps you implement kafka producer consumer patterns with production ready code, configurations, and validation guidance for backend development.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill kafka-producer-consumer

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.2 KB
---
name: "kafka-producer-consumer"
description: |
  Manage kafka producer consumer operations. Auto-activating skill for Backend Development.
  Triggers on: kafka producer consumer, kafka producer consumer
  Part of the Backend Development skill category. Use when working with kafka producer consumer functionality. Trigger with phrases like "kafka producer consumer", "kafka consumer", "kafka".
allowed-tools: "Read, Write, Edit, Bash(cmd:*), Grep"
version: 1.0.0
license: MIT
author: "Jeremy Longshore <[email protected]>"
---

# Kafka Producer Consumer

## Overview

This skill provides automated assistance for kafka producer consumer tasks within the Backend Development domain.

## When to Use

This skill activates automatically when you:
- Mention "kafka producer consumer" in your request
- Ask about kafka producer consumer patterns or best practices
- Need help with backend skills covering node.js, python, go, database design, caching, messaging, and microservices architecture.

## Instructions

1. Provides step-by-step guidance for kafka producer consumer
2. Follows industry best practices and patterns
3. Generates production-ready code and configurations
4. Validates outputs against common standards

## Examples

**Example: Basic Usage**
Request: "Help me with kafka producer consumer"
Result: Provides step-by-step guidance and generates appropriate configurations


## Prerequisites

- Relevant development environment configured
- Access to necessary tools and services
- Basic understanding of backend development concepts


## Output

- Generated configurations and code
- Best practice recommendations
- Validation results


## Error Handling

| Error | Cause | Solution |
|-------|-------|----------|
| Configuration invalid | Missing required fields | Check documentation for required parameters |
| Tool not found | Dependency not installed | Install required tools per prerequisites |
| Permission denied | Insufficient access | Verify credentials and permissions |


## Resources

- Official documentation for related tools
- Best practices guides
- Community examples and tutorials

## Related Skills

Part of the **Backend Development** skill category.
Tags: nodejs, python, go, microservices, database

Overview

This skill automates common Kafka producer and consumer operations for backend development workflows. It helps design safe, reliable message flows, generate production-ready code and configuration, and validate setups against common standards. Use it to speed up implementation, debugging, and deployment of Kafka-backed services.

How this skill works

The skill inspects intent and context to produce concrete guidance: producer/consumer examples, topic and partition strategies, client configuration, and deployment notes. It can emit sample code in Python, Node.js, or Go, generate configuration snippets (TLS, SASL, retries, acks), and run validation checks against typical misconfigurations. It focuses on practical, reproducible steps you can paste into your project.

When to use it

  • Implementing new Kafka producers or consumers in a microservice
  • Designing topic partitioning, retention, and consumer group strategies
  • Troubleshooting produce/consume failures, latency, or delivery guarantees
  • Generating client configuration for TLS, SASL, retries, and acks
  • Validating deployment settings and best-practice defaults before release

Best practices

  • Define clear message schemas and use a schema registry to avoid breaking changes
  • Set appropriate acks and retries: acks=all for durability, idempotent producers when needed
  • Use consumer groups to scale processing and commit offsets after successful processing
  • Design topic partitioning by throughput and key cardinality to balance load
  • Monitor lag, broker metrics, and implement dead-letter topics for poison messages

Example use cases

  • Generate a Python producer that publishes JSON with idempotence and retries enabled
  • Create a Node.js consumer that commits offsets only after successful processing and routes failed messages to a DLQ
  • Recommend topic configuration (partitions, retention, compaction) for an event-sourcing service
  • Diagnose a high-consumer-lag incident and outline immediate mitigation steps
  • Produce Kubernetes deployment snippets with liveness/readiness checks for Kafka clients

FAQ

Can the skill produce code in multiple languages?

Yes. It generates examples in Python, Node.js, and Go with configuration aligned to the chosen client.

Will it configure security (TLS/SASL) for Kafka clients?

Yes. It provides secure client configuration snippets and notes on credential management and permissions.