confluent-kafka-dotnet
Show / Hide Table of Contents

Interface IAsyncSerializerBuilder<T>

EXPERIMENTAL: subject to change or removal.

Defines a builder of IAsyncSerializer<T> instances, for use with SetKeySerializerBuilder(IAsyncSerializerBuilder<TKey>) and its value counterpart.

In contrast to supplying an already constructed serializer, a builder is invoked by the producer during construction, and is passed the producer's own configuration along with whether the serializer is being used for the message key or value.

Namespace: Confluent.Kafka
Assembly: Confluent.Kafka.dll
Syntax
public interface IAsyncSerializerBuilder<T>
Type Parameters
Name Description
T

Methods

Build(IEnumerable<KeyValuePair<string, string>>, bool)

Build a serializer.

Declaration
IAsyncSerializer<T> Build(IEnumerable<KeyValuePair<string, string>> config, bool isKey)
Parameters
Type Name Description
IEnumerable<KeyValuePair<string, string>> config

The configuration of the producer the serializer will be used by.

bool isKey

Whether the serializer will be used to serialize message keys (true) or message values (false).

Returns
Type Description
IAsyncSerializer<T>

The serializer.

In this article