risingwavelabs/risingwave · error
Only support glue header version 3 but found {}
Error message
Only support glue header version 3 but found {} What it means
For Glue Schema Registry Avro payloads, byte 0 of the 18-byte header must be version 3. If the first byte is anything else, the parser bails with this message showing the found value, indicating the payload is not a v3 Glue-framed Avro message.
Source
Thrown at src/connector/src/parser/avro/parser.rs:132
// FIXME: we should not use `Reader` (file header) here. See comment above and https://github.com/risingwavelabs/risingwave/issues/12871
let mut reader = Reader::with_schema(&self.schema.original_schema, payload)?;
match reader.next() {
Some(Ok(v)) => Ok(Some(v)),
Some(Err(e)) => Err(e)?,
None => bail!("avro parse unexpected eof"),
}
}
WriterSchemaCache::Glue(resolver) => {
// <https://github.com/awslabs/aws-glue-schema-registry/blob/v1.1.20/common/src/main/java/com/amazonaws/services/schemaregistry/utils/AWSSchemaRegistryConstants.java#L59-L61>
// byte 0: header version = 3
// byte 1: compression: 0 = no compression; 5 = zlib (unsupported)
// byte 2..=17: 16-byte UUID as schema version id
// byte 18..: raw avro payload
if payload.len() < 18 {
bail!("payload shorter than 18-byte glue header");
}
if payload[0] != 3 {
bail!(
"Only support glue header version 3 but found {}",
payload[0]
);
}
if payload[1] != 0 {
bail!("Non-zero compression {} not supported", payload[1]);
}
let schema_version_id = uuid::Uuid::from_slice(&payload[2..18]).unwrap();
let writer_schema = resolver.get_by_id(schema_version_id).await?;
let mut raw_payload = &payload[18..];
Ok(Some(from_avro_datum(
writer_schema.as_ref(),
&mut raw_payload,
Some(&self.schema.original_schema),
)?))
}
}
}View on GitHub (pinned to 6469eb736d)
Solutions
- Ensure all producers use the Glue Schema Registry serializer (header version 3)
- Change the RW source's schema-registry config to Confluent if producers use Confluent framing
- Inspect message bytes: byte0=0x03 and byte1=0x00 are required (version 3, no compression)
Example fix
// before // source uses glue, producer uses Confluent wire format (magic byte 0) // after // set producer serializer to GlueSchemaRegistryAvroSerializer, or set RW source to schema-registry='confluent'
Defensive patterns
Strategy: validation
Validate before calling
function checkGlueVersion(buf) {
if (buf && buf.length >= 18 && buf[0] !== 3) {
throw new Error(`glue header version must be 3, got ${buf[0]}; check producer serializer`);
}
} Type guard
function isGlueV3(buf) {
return buf instanceof Uint8Array && buf.length >= 18 && buf[0] === 3;
} Try / catch
match parse_result {
Err(e) if e.to_string().starts_with("Only support glue header version 3") => {
error!("framing mismatch: producer likely Confluent or other registry");
}
other => other?,
} Prevention
- Standardize on Glue Schema Registry v3 framing across producers
- Never mix Confluent-framed topics with Glue-configured RW sources
- Dump the first two payload bytes to verify version/compression when debugging
When it happens
Trigger: A Glue-configured Avro source receives a message whose first byte != 3 — i.e. messages serialized with a different framing (Confluent wire format magic byte 0, or another Glue header version).
Common situations: Mixing Confluent Schema Registry producers with a Glue-configured RW source; Glue SDK upgrades changing header versions; sending raw Avro binary without any registry framing.
Related errors
- payload shorter than 18-byte glue header
- unused FORMAT ENCODE option: key.message='{name}'
- unrecognized {} value {}
- schema invalid, record type required at top level of the sch
- circular reference detected in Avro schema: {} -> {}
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/555e06f5f9270fb1.
Report an issue: GitHub.