Interface IAsyncSerializer<T>
Defines a serializer for use with Confluent.Kafka.Producer<TKey, TValue>.
Namespace: Confluent.Kafka
Assembly: Confluent.Kafka.dll
Syntax
public interface IAsyncSerializer<T>
Type Parameters
| Name | Description |
|---|---|
| T |
Methods
SerializeAsync(T, SerializationContext)
Serialize the key or value of a Message<TKey, TValue> instance.
Declaration
Task<byte[]> SerializeAsync(T data, SerializationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| T | data | The value to serialize. |
| SerializationContext | context | Context relevant to the serialize operation. |
Returns
| Type | Description |
|---|---|
| Task<byte[]> | A Task that completes with the serialized data. |