Method SerializeAsync
SerializeAsync(object, Stream, ISerializerContext)
Writes a message: its schema ID, registered or looked up once per type and subject, then its Avro encoding.
public Task SerializeAsync(object message, Stream output, ISerializerContext context)
Parameters
messageobjectThe message.
outputStreamThe stream the message body is written to.
contextISerializerContextThe topic.
Returns
Exceptions
- InvalidOperationException
The message's type is not one AvroTypes knows.