Apache Kafka

Раздел про Apache Kafka: основы (топики, партиции, гарантии доставки, retention) и продовая практика (Spring Kafka, DLQ, Schema Registry, consumer lag, security, KRaft, performance tuning). Со схемами и примерами на Java/Spring.

Why it matters for UCP. Kafka is the channel for event-driven architecture in UCP services: domain events between bounded contexts, CDC from the database, analytics. At maturity level 2+ Kafka is almost always already in the stack. Part of the preparation program.

Two levels of depth. Fundamentals cover how Kafka itself works and what guarantees it gives. The production guide covers what is specific to Java/Spring and what you need to know to operate it.

Section articles

  1. Fundamentals: topics, partitions, guarantees — what is inside Kafka, how consumer groups work, which delivery guarantees exist, idempotent / transactional producer, replication, retention. Language-agnostic.
  2. Kafka in production: Spring Kafka, DLQ, Schema Registry, tuning — Spring Kafka (@KafkaListener, KafkaTemplate), error handling and DLQ, Schema Registry + Avro/Protobuf, consumer lag, performance tuning (batch.size/linger.ms/compression), security (SASL/SSL/ACL), KRaft instead of ZooKeeper.
  • Distributed patterns — Saga, Outbox, Idempotent Consumer: how Kafka is used in real systems.
  • Kafka Style Guide — the rules for working with Kafka in our Java/Spring services (codes R-KAFKA-*).
  • Resilience patterns — Circuit Breaker, Timeout, Retry: applicable to Kafka consumers.