Class AvroSharpGlueKafkaSerializer<T>
A Confluent.Kafka serializer in AWS Glue Schema Registry's wire format, on AvroSharpGlueSerializer,
as AWS's GlueSchemaRegistryKafkaSerializer. The schema is named after the topic unless the options name it.
public sealed class AvroSharpGlueKafkaSerializer<T> : IAsyncSerializer<T>, ISerializer<T>
Type Parameters
TThe type written: a type AvroTypes knows, GenericRecord or AvroValue.
- Inheritance
-
AvroSharpGlueKafkaSerializer<T>
- Implements
-
IAsyncSerializer<T>ISerializer<T>
- Inherited Members
Remarks
It is both asynchronous and synchronous: Confluent.Kafka's producer builder has a SetValueSerializer for
each, so pass it as one of them ((IAsyncSerializer<T>)serializer), or use
AvroSharpGlueKafkaExtensions. The synchronous one waits for Glue the first time each schema is
written.
Constructors
- AvroSharpGlueKafkaSerializer(IAmazonGlue, AvroSharpGlueOptions?)
Creates a serializer.
- AvroSharpGlueKafkaSerializer(AvroSharpGlueSerializer)
Creates a serializer on
serializer, sharing its caches.
Methods
- Serialize(T, SerializationContext)
Writes a value, waiting for Glue when the schema's version isn't known yet. A null value, or a null AvroValue, is a tombstone: no message body.
- SerializeAsync(T, SerializationContext)
Writes a value. A null value, or a null AvroValue, is a tombstone: no message body.