/polymath-streaming:streaming-designfrom polymath-streaming
Design a streaming topology (Kafka/Pulsar/Kinesis) — topics, partitioning key, delivery semantics, consumer groups, retention/compaction, ordering, and backpressure.
Ships in polymath-streaming. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A stream is a durable, partitioned, replayable log — not a queue. The partition key decides ordering, parallelism, and hot-spots all at once, so choose it first.
Mode: analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked [TBD] or [VERIFY], never filled in.
polymath-streaming:streaming-design.Not this when: you are designing the business event flow (saga, choreography, outbox) — that is polymath-architecture:event-driven-design. For windowed/stateful computation over the stream, polymath-streaming:stream-processing.
Throughput/lag tuning of an existing Kafka cluster is polymath-streaming:kafka-performance-tuning; Azure Event Hubs sizing is polymath-streaming:azure-event-hubs-design; schema compatibility and versioning is polymath-streaming:event-schema-evolution; long-term retention and archiving is polymath-database:data-retention-archiving.
partitions = max(peak MB/s ÷ measured per-partition MB/s, peak consumer parallelism) × growth headroom, rounded up — show the arithmetic with its inputs (measured, or [TBD] when not). Repartitioning later breaks key→partition mapping, so size for the planning horizon, not today.Streaming topology: order events (Kafka)
Topics
orders.order-events.v1 owner: ordering schema: Avro in the registry, BACKWARD compatible
orders.order-events.dlq owner: ordering poison messages + error header
Partition key: order_id — keeps one order's events in order; 2.1 M distinct ids/day spreads load; no hot key
Partition count: max(peak 24 MB/s ÷ 2 MB/s measured per partition = 12, peak consumers 16) × 1.5 headroom = 24
Delivery: at-least-once; idempotent producer on; consumers dedupe on event_id (processed_events table, 7 d)
Consumer groups
fulfillment-svc commits offsets after the DB write succeeds (never before)
analytics-sink separate group — its lag never slows fulfillment
Retention: 7 days delete; changelog topic orders.order-state compacted (latest state per order)
Lag: alert when fulfillment-svc lag > 5 min; response = scale consumers to 24 (one per partition), then page
DLQ: 3 retries with backoff → DLQ; DLQ alert on any message; replay tool documented in the runbook
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mohammadbafkar/polymath --plugin polymath-streaming9 skills in this plugin
/azure-event-hubs-designDesign and size Azure Event Hubs — tier, throughput units, partitions, consumer groups, checkpointing, Capture, Kafka endpoint./data-lake-layoutDesign the physical data lake — zones, paths, Parquet and Delta/Iceberg, file sizing, partitioning, compaction, lifecycle tiers./data-modelingModel analytical data — dimensional (star/snowflake) vs normalized vs lakehouse medallion layers, grain, partitioning, slowly-changing dimensions, and schema evolution.Other plugins' skills for the same job