{"id":"avro-registry-4byte-schema-id","text":"SchemaRegistry prepends a 4-byte big-endian unsigned int schema ID (struct.pack('>I', id)) to encoded payloads, modeling Confluent's Schema Registry wire format; schema IDs are limited to [0, 2^32).","truth_value":"IN","source":"entries/2026/05/29/avro-serializer-avro_serializer.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{"example":"header = struct.pack(\">bI\", 0, schema_id)  # magic byte + 4-byte schema ID\nreturn header + encoded_data"},"explanation":{"steps":[{"node":"avro-registry-4byte-schema-id","truth_value":"IN","reason":"premise"}]}}