Table of Contents

Method ReadPayloadAsync

Namespace
AvroSharp.Messages
Assembly
AvroSharp.dll

ReadPayloadAsync(AvroSchemaId, ReadOnlyMemory<byte>, CancellationToken)

Reads the Avro data of a message whose schema ID travels outside it, fetching the schema when the ID is new.

public ValueTask<T> ReadPayloadAsync(AvroSchemaId id, ReadOnlyMemory<byte> payload, CancellationToken cancellationToken = default)

Parameters

id AvroSchemaId

The schema ID.

payload ReadOnlyMemory<byte>

The Avro data alone, uncompressed.

cancellationToken CancellationToken

Cancels a fetch. Concurrent reads of the same new ID fetch it once: the others wait for it.

Returns

ValueTask<T>