Method DeserializeAsync
DeserializeAsync<T>(ReadOnlyMemory<byte>, CancellationToken)
Reads a message as T.
public ValueTask<T> DeserializeAsync<T>(ReadOnlyMemory<byte> message, CancellationToken cancellationToken = default)
Parameters
messageReadOnlyMemory<byte>The message, compressed or not.
cancellationTokenCancellationTokenCancels the registry call, if one is needed.
Returns
- ValueTask<T>
Type Parameters
TThe type to read: a type AvroTypes knows, GenericRecord or AvroValue.
Exceptions
- AvroDataException
The message isn't in Glue Schema Registry's wire format, or its data is invalid.
- InvalidOperationException
Tisn't a type the serializer can read, or the schema version isn't Avro.