Skip to content
Back to skills

Streaming Patterns

ASecurity

Provides Kafka producer and consumer best practices and dead letter queue patterns for streaming data; use when designing Kafka consumers or producers or implementing real-time pipelines.

  • 19 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 19, 2026
ai-agentspython

Security analysis

A100/100

Scanned October 19, 2026

npx -y skills add sawrus/agent-guides --skill streaming-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Streaming Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Streaming Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sawrus-streaming-patterns/badge)](https://www.skillsdirectory.com/skills/sawrus-streaming-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: streaming-patterns
description: "Provides Kafka producer and consumer best practices and dead letter queue patterns for streaming data; use when designing Kafka consumers or producers or implementing real-time pipelines."
---

# Skill: Streaming Data Patterns

## When to load

When designing Kafka consumers/producers or implementing real-time pipelines.

## Producer Best Practices

```python
producer = Producer({
    "bootstrap.servers": settings.KAFKA_BROKERS,
    "acks": "all",               # Wait for all replicas
    "retries": 5,
    "enable.idempotence": True,  # Exactly-once delivery
    "compression.type": "snappy",
})
```

## Consumer Pattern

```python
consumer = Consumer({
    "group.id": "order-processor-v1",  # Version when changing logic
    "auto.offset.reset": "earliest",
    "enable.auto.commit": False,        # Manual commit: only after successful processing
})

msg = consumer.poll(timeout=1.0)
try:
    process(deserialize(msg.value()))
    consumer.commit(msg)  # Commit only after success
except ProcessingError as e:
    publish_to_dlq(msg, e)  # Dead-letter, don't block partition
    consumer.commit(msg)
```

## Dead Letter Queue

```json
{
  "original_topic": "orders.created.v1",
  "original_offset": 12345,
  "original_payload": "...",
  "error_message": "Deserialization failed",
  "error_timestamp": "2026-02-16T10:30:00Z",
  "retry_count": 3
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.