انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهMID-028-L03

المفاتيح والترتيب

  • الدرس 3 من 9
  • Mid-level
في هذا الدرس 4 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

choose a key that keeps the ordering that matters.

الموضوعات المخطط لها

  • The producer picks the partition from the key hash; the same key always goes to the same partition (while partition count is unchanged).
  • Key by the entity whose events must stay in order: orderId for order events.
  • A null key spreads records across partitions; no ordering between them.
  • A hot key (one huge customer) overloads one partition.
  • Ordering across different keys is not guaranteed and rarely needed.
تفاصيل المخطط المبدئي

عرض عملي

OrderPlaced(o-42), OrderPaid(o-42), OrderShipped(o-42) all land in partition 1 in order.

اختبر فهمك

What key keeps all events of one order together?

أظهر الإجابة

The order ID.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.