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

عرض عملي: فقدان حدث دون outbox

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

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

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

في هذا الدرس

reproduce the dual-write loss, then fix it. Prepares MID-029-LAB1.

تفاصيل المخطط المبدئي

خطوة بخطوة

  1. Start orders, Kafka, and a consumer log; place an order and see the event arrive.
  2. Add a Thread.sleep (or a kill hook) between repo.save and kafka.send.
  3. Place an order and kill -9 the service during the pause; restart and check: the order exists, no event ever arrives.
  4. Planned mistake: "fix" it by moving send inside @Transactional and repeat the kill. The event is still lost (or sent for a rolled-back order). Fix: it is the same dual write.
  5. Add the outbox table and relay; repeat the kill and watch the event arrive after restart.

التطبيق

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

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

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

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