Table of Contents

Class KafkaAvroSerializerConfiguration

Namespace
Silverback.Messaging.Configuration.Kafka.SchemaRegistry
Assembly
Silverback.Integration.Kafka.SchemaRegistry.dll

Wraps the Confluent.SchemaRegistry.Serdes.AvroSerializerConfig.

public sealed record KafkaAvroSerializerConfiguration : IEquatable<KafkaAvroSerializerConfiguration>
Inheritance
KafkaAvroSerializerConfiguration
Implements
Inherited Members

Constructors

KafkaAvroSerializerConfiguration()

public KafkaAvroSerializerConfiguration()

Properties

AutoRegisterSchemas

Gets a value indicating whether the serializer should attempt to auto-register unrecognized schemas with the schema registry. The default is true.

public bool? AutoRegisterSchemas { get; init; }

Property Value

bool?

BufferBytes

Gets the initial size (in bytes) of the buffer used for the message serialization. Use a value high enough to avoid resizing the buffer, but small enough to avoid excessive memory use. Each message is serialized into a new buffer. The default is 1024.

public int? BufferBytes { get; init; }

Property Value

int?

NormalizeSchemas

Gets a value indicating whether the schemas should be normalized, transforming them to have a consistent format, including ordering properties and references.

public bool? NormalizeSchemas { get; init; }

Property Value

bool?

SchemaIdStrategy

Gets the schema ID strategy. The default is Confluent.SchemaRegistry.SchemaIdSerializerStrategy.Prefix.

public SchemaIdSerializerStrategy? SchemaIdStrategy { get; init; }

Property Value

SchemaIdSerializerStrategy?

SubjectNameStrategy

Gets the subject name strategy. The default is Confluent.SchemaRegistry.SubjectNameStrategy.Associated.

public SubjectNameStrategy? SubjectNameStrategy { get; init; }

Property Value

SubjectNameStrategy?

UseLatestVersion

Gets a value indicating whether the serializer should use the latest subject version for serialization. Note that there is no check that the latest schema is backwards compatible with the schema of the object being serialized.

public bool? UseLatestVersion { get; init; }

Property Value

bool?

UseLatestWithMetadata

Gets the metadata to be used to select the latest subject version to be used for serialization. Note that there is no check that the latest schema is backwards compatible with the schema of the object being serialized.

public IReadOnlyDictionary<string, string>? UseLatestWithMetadata { get; init; }

Property Value

IReadOnlyDictionary<string, string>

UseSchemaId

Gets the ID of the schema to be used for serialization. Note that there is no check that the schema is backwards compatible with the schema of the object being serialized.

public int? UseSchemaId { get; init; }

Property Value

int?

ValidationRulesExecution

Gets a value specifying when the inline validation rules run, relative to the domain rule transformations. The default is Confluent.SchemaRegistry.ValidationRulesExecution.Disabled.

public ValidationRulesExecution? ValidationRulesExecution { get; init; }

Property Value

ValidationRulesExecution?

ValidationRulesFailFast

Gets a value indicating whether the validation stops at the first failed rule and reports only that violation.

public bool? ValidationRulesFailFast { get; init; }

Property Value

bool?

Methods

Equals(KafkaAvroSerializerConfiguration?)

public bool Equals(KafkaAvroSerializerConfiguration? other)

Parameters

other KafkaAvroSerializerConfiguration

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(KafkaAvroSerializerConfiguration?, KafkaAvroSerializerConfiguration?)

public static bool operator ==(KafkaAvroSerializerConfiguration? left, KafkaAvroSerializerConfiguration? right)

Parameters

left KafkaAvroSerializerConfiguration
right KafkaAvroSerializerConfiguration

Returns

bool

operator !=(KafkaAvroSerializerConfiguration?, KafkaAvroSerializerConfiguration?)

public static bool operator !=(KafkaAvroSerializerConfiguration? left, KafkaAvroSerializerConfiguration? right)

Parameters

left KafkaAvroSerializerConfiguration
right KafkaAvroSerializerConfiguration

Returns

bool