Kafka کی تعمیر ایک بروکرز کے کلسٹر (سرورز) پر مشتمل ہے جو تقسیم شدہ، نقل شدہ topics کو محفوظ رکھتے ہیں، producers لکھتے ہیں اور consumers پڑھتے ہیں، metadata کی تنظیم سے ہم آہنگ (تاریخی طور پر ZooKeeper، اب KRaft)۔ تعمیر کو سمجھنا واضح کرتا ہے کہ Kafka ایک distributed system کے طور پر کیسے کام کرتا ہے۔
اہم اجزاء
BROKERS → Kafka SERVERS forming a CLUSTER:
→ store topic partitions (the data); serve producers and consumers
→ a cluster of multiple brokers → distributes data and load; scales horizontally
TOPICS / PARTITIONS → topics split into partitions, distributed across brokers
PRODUCERS → write events to topics (to partition leaders)
CONSUMERS (in groups) → read events from partitions
COORDINATION → metadata, cluster state, leader election:
→ historically ZOOKEEPER; now KRAFT (Kafka's own built-in consensus, removing ZooKeeper)
