Skip to main content

Module glue

Module glue 

Source
Expand description

Wire-format helpers for the AWS Glue Schema Registry framing.

Glue prepends an 18-byte header to each Kafka record payload:

OffsetBytesMeaning
01Header version. Glue currently emits 0x03.
11Compression byte. 0x00 = none, 0x05 = zlib.
2..1816Schema-version UUID, big-endian.
18..NThe 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 payload with the Glue Avro header, producing a buffer suitable to publish to Kafka. The header is laid down using the uncompressed framing (compression = 0x00).