Table of Contents

Method SetAvroSharpKeySerializer

Namespace
AvroSharp.Confluent
Assembly
AvroSharp.Confluent.dll

SetAvroSharpKeySerializer<TKey, TValue>(ProducerBuilder<TKey, TValue>, ISchemaRegistryClient, AvroSharpSerializerConfig?, RuleRegistry?)

Writes keys with an AvroSharpSerializer<T> of TKey, which AvroTypes knows.

public static ProducerBuilder<TKey, TValue> SetAvroSharpKeySerializer<TKey, TValue>(this ProducerBuilder<TKey, TValue> builder, ISchemaRegistryClient client, AvroSharpSerializerConfig? config = null, RuleRegistry? ruleRegistry = null)

Parameters

builder ProducerBuilder<TKey, TValue>

The producer builder.

client ISchemaRegistryClient

The schema registry.

config AvroSharpSerializerConfig

The settings, or null for the defaults.

ruleRegistry RuleRegistry

The data contract rules, or null for Confluent.SchemaRegistry.RuleRegistry.GlobalInstance.

Returns

ProducerBuilder<TKey, TValue>

Type Parameters

TKey

The key type.

TValue

The value type.