عرض عملي: تغيير OrderPlaced دون كسر المستهلكين
في هذا الدرس 3 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
replace total (cents, long) with money (amount, currency) safely. Prepares MID-062-LAB1.
تفاصيل المخطط المبدئي
خطوة بخطوة
- Show current Avro schema v1 and the registry set to BACKWARD_TRANSITIVE (or FULL).
- Add
moneywith a default and keeptotal; register v2; the check passes. - Deploy the producer to emit both fields; consumers on v1 keep working.
- Planned mistake: remove
totalin the same change; the registry rejects it (or a contract test fails). Fix: keep it for a release. - Migrate consumers to
money; watch usage oftotalfall to zero. - Register v3 removing
totalafter the deprecation window.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.