Blog/Technical/Kafka Event-Driven Architecture — System Architect
Kafka Event-Driven Architecture — System Architecture
This project demonstrates Kafka and event-driven architecture concepts using a fully in-memory mock broker. The mock broker faithfully reproduces the partition model, consumer group offsets, and lag mechanics of a...
Shreedhar Kodate·02 April 2025·4 min read
kafka-event-drivendocs
Overview
This project demonstrates Kafka and event-driven architecture concepts using
a fully in-memory mock broker. The mock broker faithfully reproduces the
partition model, consumer group offsets, and lag mechanics of a real Apache
Kafka cluster, allowing all patterns to run without an external service.
Core Kafka Concepts
Topics, Partitions, and Replication
A Kafka topic is a named, ordered, immutable log. Each topic is divided
into partitions — the unit of parallelism and ordering. Within a
partition, messages are totally ordered by offset. A replication factor
determines how many broker replicas store each partition.
In-Sync Replicas (ISR) is the set of replicas that are fully caught up to
the leader. acks=all means the producer waits for all ISR members to
acknowledge the write before declaring success, giving the strongest durability
guarantee.
Delivery Semantics
Semantic
Producer config
Consumer behaviour
At-most-once
acks=0, fire-and-forget
Auto-commit before process
At-least-once
acks=all + retries
Manual commit after process
Exactly-once
Idempotent + transactions
Transactional read-process
This project implements at-least-once delivery on the consumer side
(manual commit after processing) combined with DLQ routing for failed messages.