AsyncSchemaRegistrySerializer<T> class

An IAsyncSerializer<> that resolves Avro schemas on the fly. When serializing messages, this serializer will attempt to look up a subject that matches the topic name (if not already cached).
AssemblyChr.Avro.Confluent
NamespaceChr.Avro.Confluent
Signature
public class AsyncSchemaRegistrySerializer<T> : Confluent.Kafka.IAsyncSerializer<T>
Baseobject
InterfacesIAsyncSerializer<T>
By default, when serializing keys for a topic with name "test_topic", this deserializer would query the Schema Registry for subject "test_topic-key". (This is a Confluent convention—values would be "test_topic-value".)

Constructors

AsyncSchemaRegistrySerializer(ISchemaRegistryClient, AutomaticRegistrationBehavior, ISchemaBuilder, IJsonSchemaReader, IJsonSchemaWriter, IBinarySerializerBuilder, Func<SerializationContext, string>, TombstoneBehavior)
Creates a serializer.
AsyncSchemaRegistrySerializer(IEnumerable<KeyValuePair<string>>, AutomaticRegistrationBehavior, ISchemaBuilder, IJsonSchemaReader, IJsonSchemaWriter, IBinarySerializerBuilder, Func<SerializationContext, string>, TombstoneBehavior)
Creates a serializer.

Properties

AutomaticRegistrationBehavior RegisterAutomatically
Whether to automatically register schemas that match the type being serialized.
ISchemaBuilder SchemaBuilder
The schema builder used to create a schema for a C# type when registering automatically.
IJsonSchemaReader SchemaReader
The JSON schema reader used to convert schemas received from the registry into abstract representations.
IJsonSchemaWriter SchemaWriter
The JSON schema writer used to convert abstract schema representations when registering automatically.
IBinarySerializerBuilder SerializerBuilder
The deserializer builder to use to build serialization functions for C# types.
Func<SerializationContext, string> SubjectNameBuilder
A function that determines the subject name given the topic name and a component type (key or value).
TombstoneBehavior TombstoneBehavior
The behavior of the serializer on tombstone records.

Methods

Func<T, byte[]> Build(int, Schema)
Builds a serializer for the Confluent wire format.
Task<byte[]> SerializeAsync(T, SerializationContext)
Serialize a message. (See SerializeAsync(, SerializationContext).)
Chr.Avro