الأقسام (Partitions) هي العنصر المركزي في تصميم Kafka — فهي تمكّن التوازي وقابلية التوسع (توزيع البيانات والاستهلاك) مع توفير ضمانات الترتيب داخل كل قسم. فهم الأقسام هو المفتاح لفهم كيفية توسع Kafka وترتيب الأحداث.
الأقسام تمكّن التوازي والتوسع
A topic is split into multiple PARTITIONS, distributed across brokers:
→ data is spread across partitions → distribute storage and load
→ CONSUMER PARALLELISM → each partition consumed by one consumer in a group →
more partitions = more parallel consumers = higher throughput
→ scale a topic by adding partitions (and consumers)
→ partitions are the unit of PARALLELISM and horizontal scaling in Kafka
