/major-ai-skills:kafkafrom major-ai-skills
Design Kafka topics, keys, and consumer groups; implement idempotent handlers and ordered offset commits; tune producer acks and backpressure; debunk end-to-end exactly-once without app cooperation.
Ships in major-ai-skills. 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.
Kafka is a distributed commit log: producers append to topics partitioned for parallelism; consumer groups divide partitions among consumers. Ordering is per partition (key-dependent). Brokers replicate partitions (ISR); consumers track offsets. Delivery is at-least-once by default; idempotent producers and transactions narrow failure modes but do not replace application idempotency across external systems.
Producers (idempotence?, acks, compression)
-> brokers (leader/followers, ISR)
-> consumer group (poll, process, commit offsets)
-> side effects (DB, HTTP) — must be idempotent
Use when
Do not use when
@rabbitmq, @nats JetStream work-queue)acks=all, min.insync.replicas aligned with replication; enable.idempotence=true for deduped broker writes; retries with max.in.flight=1 when ordering matters (trade throughput).max.poll.interval.ms and max.poll.records sized to handler latency; pause consumption when downstream is saturated; monitor consumer lag and rebalance storms.acks=all
enable.idempotence=true
retries=2147483647
max.in.flight.requests.per.connection=5
compression.type=lz4
while (true) {
ConsumerRecords<String, String> records = consumer.poll(Duration.ofMillis(500));
for (ConsumerRecord<String, String> rec : records) {
processIdempotent(rec.key(), rec.value()); // dedupe on business key
}
consumer.commitSync(); // after batch success
}
INSERT INTO processed_events (event_id, payload)
VALUES ($1, $2)
ON CONFLICT (event_id) DO NOTHING;
kafka-consumer-groups.sh --bootstrap-server $BOOTSTRAP \
--describe --group order-service
| Failure signature | Root cause | Diagnostic & fix |
|---|---|---|
| Growing lag | Slow handler / blocked IO | Scale consumers ≤ partitions; optimize handler; pause upstream |
| Duplicate processing | Rebalance + at-least-once | Idempotent writes; store offsets with outbox pattern |
| Lost messages | Commit before process | Commit after effects; transactional consume if justified |
| Hot partition | Skewed keys | Salt keys; separate topics |
| Rebalance loop | Long poll interval exceeded | Raise max.poll.interval.ms; shrink batch |
OutOfOrderSequenceException | idempotence + too many in-flight | Reduce in-flight or enable idempotence properly |
| EOS “works” but DB dupes | External system outside txn | Outbox/inbox; idempotent MERGE |
@postgresql — projecting events to tables@temporal — durable workflows consuming events@schema — @llm-json-contract-check for event payloadsMANDATORY: Default consumer designs to at-least-once with idempotent handlers. Never commit offsets before successful side effects unless the user explicitly accepts loss. Explain that exactly-once spans messaging + application + datastore. Size
max.poll.interval.msto worst-case handler time.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization./act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.Other plugins' skills for the same job