عرض عملي: فقدان حدث دون outbox
في هذا الدرس 3 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
reproduce the dual-write loss, then fix it. Prepares MID-029-LAB1.
تفاصيل المخطط المبدئي
خطوة بخطوة
- Start
orders, Kafka, and a consumer log; place an order and see the event arrive. - Add a
Thread.sleep(or a kill hook) betweenrepo.saveandkafka.send. - Place an order and
kill -9the service during the pause; restart and check: the order exists, no event ever arrives. - Planned mistake: "fix" it by moving
sendinside@Transactionaland repeat the kill. The event is still lost (or sent for a rolled-back order). Fix: it is the same dual write. - Add the outbox table and relay; repeat the kill and watch the event arrive after restart.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.