سجلات المخططات (Schema registries) وأنماط التوافق
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
enforce event compatibility with a schema registry.
الموضوعات المخطط لها
- A schema registry stores versioned schemas (Avro, Protobuf, JSON Schema) per subject, often per topic.
- Producers register the schema; the registry rejects incompatible versions.
- Backward: new schema can read data written with the old one (upgrade consumers first).
- Forward: old schema can read data written with the new one (upgrade producers first).
- Full: both; the safest for long-lived topics. The
_TRANSITIVEvariants check all earlier versions. - Avro: adding a field needs a default. Protobuf: never reuse field numbers; reserve removed ones.
- Mode names and defaults differ by registry product; verify version before recording.
تفاصيل المخطط المبدئي
عرض عملي
an Avro OrderPlaced v2 adding "currency" with "default": "EUR", and the registry compatibility check call passing.
اختبر فهمك
Which change is safe in Avro under backward mode: add a field with a default, or add one without?
أظهر الإجابة
With a default.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.