Method SetAvroSharpKeySerializer
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
builderProducerBuilder<TKey, TValue>The producer builder.
clientISchemaRegistryClientThe schema registry.
configAvroSharpSerializerConfigThe settings, or null for the defaults.
ruleRegistryRuleRegistryThe data contract rules, or null for Confluent.SchemaRegistry.RuleRegistry.GlobalInstance.
Returns
- ProducerBuilder<TKey, TValue>
Type Parameters
TKeyThe key type.
TValueThe value type.