Expand description
Wire-format helpers for the AWS Glue Schema Registry framing.
Glue prepends an 18-byte header to each Kafka record payload:
| Offset | Bytes | Meaning |
|---|---|---|
| 0 | 1 | Header version. Glue currently emits 0x03. |
| 1 | 1 | Compression byte. 0x00 = none, 0x05 = zlib. |
| 2..18 | 16 | Schema-version UUID, big-endian. |
| 18.. | N | The serialized record payload. |
Not documented in any spec (that I could find it), ref to the source
serializer-deserializer/src/main/java/com/amazonaws/services/schemaregistry/serializers/SerializationDataEncoder.java
Materialize only supports the uncompressed framing (compression = 0x00). Compressed records are rejected — supporting zlib at the wire
layer is straightforward but no consumer in Materialize asks for it yet,
and silently decompressing would mask producer misconfiguration.
The Confluent analogue lives in crate::confluent.
Constants§
- HEADER_
LEN - Length of the Glue header in bytes (version + compression + UUID).
Functions§
- extract_
avro_ header - Parse the Glue Avro header from the front of
buf, returning the schema-version UUID and a subslice covering the record payload. - prepend_
avro_ header - Frame
payloadwith the Glue Avro header, producing a buffer suitable to publish to Kafka. The header is laid down using the uncompressed framing (compression = 0x00).