Skip to main content

build_avro_encoder

Function build_avro_encoder 

Source
async fn build_avro_encoder(
    desc: RelationDesc,
    debezium: bool,
    schema: String,
    compatibility_level: Option<CompatibilityLevel>,
    wire_format: WireFormat,
    subject: String,
    storage_configuration: &StorageConfiguration,
) -> Result<AvroEncoder, Error>
Expand description

Register an Avro schema with the sink’s schema registry and build an AvroEncoder framing records for that registry.

subject is the registry name for the schema, either {topic}-key or {topic}-value. It is the Confluent subject or, for Glue, the schema name. Registration happens here in the render cycle, so schemas are re-published each time the sink is rendered. The WireFormat must carry a registry: sinks are never built without one (see the sink planner), so a missing registry is unreachable.