Why this matters
- Single-page review before VaultCommerce loop or external interviews.
- Covers what interviewers probe at staff level: EOS, KRaft, partitioning, ops.
- Cross-links mental models from all 51 prior articles.
- Not a substitute for depth — a structured recall aid.
Cloud building blocks toolbox
Architecture quick reference
Broker hosts partition leaders. Topic → partitions → ordered offsets. Consumer groups divide partitions. KRaft controllers manage metadata. RF=3, min.insync.replicas=2, acks=all for durability. VaultCommerce baseline cluster: 6 brokers, 12 partitions on order topics.
Key points
- KRaft — metadata quorum; no ZooKeeper
- ISR + acks=all — durable produce path
- Partition key — ordering scope
- Consumer lag — primary consumer health metric
- Transactional outbox — DB-Kafka consistency pattern
Semantics and patterns
At-least-once default; idempotent producer for log dedup; transactions for read-process-write; outbox for DB+Kafka atomicity; saga via choreography; DLT for poison messages. Ordering per partition key. Schema Registry BACKWARD compatibility.
Tuning and ops knobs
Producer: linger.ms, compression.type=lz4, enable.idempotence. Consumer: max.poll.interval, CooperativeStickyAssignor, manual commit. Ops: lag alerts, URP alerts, rolling restarts, MM2 for DR. Spring: KafkaTemplate, @KafkaListener, DefaultErrorHandler.
// VaultCommerce interview skeleton — producer + consumer durability baseline
// Producer: acks=all, idempotence, Avro
props.put(ProducerConfig.ACKS_CONFIG, "all");
props.put(ProducerConfig.ENABLE_IDEMPOTENCE_CONFIG, true);
// Consumer: manual commit, cooperative rebalance, idempotent handler
props.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, false);
props.put(ConsumerConfig.PARTITION_ASSIGNMENT_STRATEGY_CONFIG,
CooperativeStickyAssignor.class.getName());
// + processed_events dedup table or natural SQL idempotency
Quick recall
Everything you need if you only revisit this box.
- Log not queue; offsets not deletion.
- Durability = acks=all + min ISR + RF.
- End-to-end EOS needs outbox or idempotent consumers.
Test yourself
Answer these before moving on — recall is what makes it stick.