/polymath-streaming:azure-event-hubs-designfrom polymath-streaming
Design and size Azure Event Hubs — tier, throughput units, partitions, consumer groups, checkpointing, Capture, Kafka endpoint.
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.
None: SKILL.md is the whole skill.
Event Hubs is a partitioned log with managed capacity. The partition count (fixed early) caps consumer parallelism; the tier and throughput units cap bytes per second. Size both from the numbers, and checkpoint with care.
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.
ServerBusy/throttling, uneven partition load, or consumers that lag or reprocess after restarts.Not this when: the platform is Kafka outside Azure — polymath-streaming:kafka-performance-tuning and streaming-design. For the enterprise-message (commands, sessions, DLQ, transactions) pattern — Service Bus is the fit; see polymath-architecture:integration-design. For the Azure landing zone — polymath-cloud:design-azure-pattern.
EventProcessor, Kafka clients.partitions ≥ max(peak consumers needed, peak MB/s ÷ safe per-partition MB/s) with headroom, within tier limits. Per-partition throughput is bounded; hot keys concentrate on one partition.EventDataBatch, up to the max batch size) rather than one send per event; reuse the client/connection (AMQP connections are expensive); async with retries; handle ServerBusy with backoff (it signals a throttle — raise TUs/PUs or reduce rate); consider compression in the payload. Max event size is limited — large payloads go to Blob storage with a pointer.$Default is for quick tests). With EventProcessorClient, state lives in Blob Storage (checkpoint + partition ownership): use a storage account in the same region, avoid frequent checkpoints (checkpoint per batch or every N events/seconds, not per event — each is a storage write), and make processing idempotent — checkpoint after processing gives at-least-once, so after a restart or rebalance you reprocess since the last checkpoint. For Azure Functions Event Hubs trigger, tune maxEventBatchSize/prefetchCount and watch for batch redelivery on failures; poison events need an explicit dead-letter strategy (Event Hubs has no DLQ — write failures to a side Event Hub/Blob/Service Bus).polymath-streaming:data-lake-layout). Capture is the long-term record; keep Event Hubs retention short (the replay window you really need). Downstream: Databricks Auto Loader / Synapse / Fabric over the Capture path.polymath-scalability:multi-region-design). Alert on throttled requests, server errors, and consumer lag.Event Hubs design: vehicle telemetry (Azure, West Europe)
Choice: Event Hubs (log semantics, replay, 4 independent consumers). Not Service Bus (no per-message ack workflow).
Tier: Standard with auto-inflate [TBD: move to Premium if private-link isolation/latency SLO required].
Load: peak 18 MB/s, 22,000 events/s (≈ 0.8 KB each) → TUs = max(18, 22, egress (4 groups × 18 = 72 MB/s ÷ 2 = 36)) = 36 TU, egress-bound. That sits close to the Standard auto-inflate ceiling [VERIFY: current TU cap], leaving little burst headroom → Premium (size PUs from a load test) or cut egress by feeding cg-search and cg-replay from the Capture files instead.
Partitions: 32 [VERIFY: tier max]; ≥ max(24 consumers, 18 MB/s ÷ 1 MB/s per partition) = 24; round to 32; vehicle_id as partition key (fleet 2 M vehicles → even; top vehicle < 0.001%).
Producers: batched EventDataBatch (≈ 100 events), shared client, backoff on ServerBusy.
Consumer groups: cg-alerts (Functions), cg-stream (Databricks Structured Streaming), cg-search (indexer), cg-replay (ad hoc).
Checkpointing: Blob checkpoint every 500 events or 10 s; processors idempotent on (vehicle_id, event_seq).
Capture: Avro to ADLS Gen2, 5 min / 100 MB windows; Event Hubs retention 3 d; compaction job hourly → Delta bronze.
DR: zone-redundant; geo-replication to North Europe [VERIFY: tier support]; consumers dedupe across failover.
Security: managed identity RBAC, private endpoints, no SAS in apps.
Alerts: ThrottledRequests > 0, ServerErrors, lag age > 2 min, Capture backlog.
[VERIFY] against current Microsoft limits.$Default.send per event over a new connection each time.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
9 skills in this plugin
/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./data-pipelineDesign a data pipeline — ETL vs ELT, batch vs streaming, orchestration/DAG, idempotent backfills, schema handling, data-quality checks, and lineage./event-schema-evolutionEvolve event schemas safely — registry, Avro/Protobuf compatibility modes, upgrade order, breaking-change playbook, CI contract checks./kafka-performance-tuningTune Kafka throughput, latency and consumer lag — producer batching, acks, fetch, rebalances, broker IO. Not topology (streaming-design)./lakehouse-performanceTune Databricks/Spark and Delta — small files, OPTIMIZE, clustering, shuffle, skew, Auto Loader, cluster cost. Not lake layout.npx claudepluginhub mohammadbafkar/polymath --plugin polymath-streaming