risingwave_connector::schema::schema_registry::util

Function extract_schema_id

source
pub(crate) fn extract_schema_id(
    payload: &[u8],
) -> Result<(i32, &[u8]), WireFormatError>
Expand description

Returns (schema_id, payload)

Refer to Confluent schema registry wire format

BytesAreaDescription
0Magic ByteConfluent serialization format version number; currently always 0.
1-4Schema ID4-byte schema ID as returned by Schema Registry.
5-…DataSerialized data for the specified schema format (for example, binary encoding for Avro or Protobuf.