Class KafkaProtobufSerializerConfiguration
- Namespace
- Silverback.Messaging.Configuration.Kafka.SchemaRegistry
- Assembly
- Silverback.Integration.Kafka.SchemaRegistry.dll
Wraps the Confluent.SchemaRegistry.Serdes.ProtobufSerializerConfig.
public sealed record KafkaProtobufSerializerConfiguration : IEquatable<KafkaProtobufSerializerConfiguration>
- Inheritance
-
KafkaProtobufSerializerConfiguration
- Implements
- Inherited Members
Constructors
KafkaProtobufSerializerConfiguration()
public KafkaProtobufSerializerConfiguration()
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?
CustomReferenceSubjectNameStrategy
Gets the custom reference subject name strategy resolver. It is used only if the ReferenceSubjectNameStrategy is set to Confluent.SchemaRegistry.ReferenceSubjectNameStrategy.Custom.
public ICustomReferenceSubjectNameStrategy? CustomReferenceSubjectNameStrategy { get; init; }
Property Value
- ICustomReferenceSubjectNameStrategy
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?
ReferenceSubjectNameStrategy
Gets the reference subject name strategy. The default is Confluent.SchemaRegistry.ReferenceSubjectNameStrategy.ReferenceName.
public ReferenceSubjectNameStrategy? ReferenceSubjectNameStrategy { get; init; }
Property Value
- ReferenceSubjectNameStrategy?
SchemaIdStrategy
Gets the schema ID strategy. The default is Confluent.SchemaRegistry.SchemaIdSerializerStrategy.Prefix.
public SchemaIdSerializerStrategy? SchemaIdStrategy { get; init; }
Property Value
- SchemaIdSerializerStrategy?
SkipKnownTypes
Gets a value indicating whether the serializer should skip the known types when resolving the dependencies. The default is
true.
public bool? SkipKnownTypes { get; init; }
Property Value
- bool?
SubjectNameStrategy
Gets the subject name strategy. The default is Confluent.SchemaRegistry.SubjectNameStrategy.Associated.
public SubjectNameStrategy? SubjectNameStrategy { get; init; }
Property Value
- SubjectNameStrategy?
UseDeprecatedFormat
Gets a value indicating whether the serializer should serialize the message indexes without zig-zag encoding.
public bool? UseDeprecatedFormat { get; init; }
Property Value
- bool?
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
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(KafkaProtobufSerializerConfiguration?)
public bool Equals(KafkaProtobufSerializerConfiguration? other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(KafkaProtobufSerializerConfiguration?, KafkaProtobufSerializerConfiguration?)
public static bool operator ==(KafkaProtobufSerializerConfiguration? left, KafkaProtobufSerializerConfiguration? right)
Parameters
Returns
operator !=(KafkaProtobufSerializerConfiguration?, KafkaProtobufSerializerConfiguration?)
public static bool operator !=(KafkaProtobufSerializerConfiguration? left, KafkaProtobufSerializerConfiguration? right)