confluent-kafka-dotnet
Show / Hide Table of Contents

Class ProtobufSerializerConfig

ProtobufSerializer<T> configuration properties.

Inheritance
object
Config
SerdeConfig
ProtobufSerializerConfig
Implements
IEnumerable<KeyValuePair<string, string>>
IEnumerable
Inherited Members
SerdeConfig.GetDictionaryProperty(string)
SerdeConfig.SetDictionaryProperty(string, IDictionary<string, string>)
Config.Set(string, string)
Config.Get(string)
Config.GetInt(string)
Config.GetBool(string)
Config.GetDouble(string)
Config.GetEnum(Type, string)
Config.SetObject(string, object)
Config.properties
Config.GetEnumerator()
Config.CancellationDelayMaxMs
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Confluent.SchemaRegistry.Serdes
Assembly: Confluent.SchemaRegistry.Serdes.Protobuf.dll
Syntax
public class ProtobufSerializerConfig : SerdeConfig, IEnumerable<KeyValuePair<string, string>>, IEnumerable

Constructors

ProtobufSerializerConfig()

Initialize a new ProtobufSerializerConfig.

Declaration
public ProtobufSerializerConfig()

ProtobufSerializerConfig(IEnumerable<KeyValuePair<string, string>>)

Initialize a new ProtobufSerializerConfig from the provided key/value pair collection.

Declaration
public ProtobufSerializerConfig(IEnumerable<KeyValuePair<string, string>> config)
Parameters
Type Name Description
IEnumerable<KeyValuePair<string, string>> config

Properties

AutoRegisterSchemas

Specifies whether or not the Protobuf serializer should attempt to auto-register unrecognized schemas with Confluent Schema Registry.

default: true

Declaration
public bool? AutoRegisterSchemas { get; set; }
Property Value
Type Description
bool?

BufferBytes

Specifies the initial size (in bytes) of the buffer used for Protobuf message serialization. Use a value high enough to avoid resizing the buffer, but small enough to avoid excessive memory use. Inspect the size of the byte array returned by the Serialize method to estimate an appropriate value. Note: each call to serialize creates a new buffer.

default: 1024

Declaration
public int? BufferBytes { get; set; }
Property Value
Type Description
int?

CustomReferenceSubjectNameStrategy

Custom reference subject name strategy resolver. Ensure Custom is set for this to take effect.

Declaration
public ICustomReferenceSubjectNameStrategy CustomReferenceSubjectNameStrategy { get; set; }
Property Value
Type Description
ICustomReferenceSubjectNameStrategy

NormalizeSchemas

Specifies whether to normalize schemas, which will transform schemas to have a consistent format, including ordering properties and references.

default: false

Declaration
public bool? NormalizeSchemas { get; set; }
Property Value
Type Description
bool?

ReferenceSubjectNameStrategy

Reference subject name strategy.

default: ReferenceSubjectNameStrategy.ReferenceName

Declaration
public ReferenceSubjectNameStrategy? ReferenceSubjectNameStrategy { get; set; }
Property Value
Type Description
ReferenceSubjectNameStrategy?

SchemaIdStrategy

Schema id strategy.

default: SchemaIdSerializerStrategy.Prefix

Declaration
public SchemaIdSerializerStrategy? SchemaIdStrategy { get; set; }
Property Value
Type Description
SchemaIdSerializerStrategy?

SkipKnownTypes

Specifies whether or not the Protobuf serializer should skip known types when resolving dependencies.

default: true

Declaration
public bool? SkipKnownTypes { get; set; }
Property Value
Type Description
bool?

SubjectNameStrategy

Subject name strategy.

default: SubjectNameStrategy.Topic

Declaration
public SubjectNameStrategy? SubjectNameStrategy { get; set; }
Property Value
Type Description
SubjectNameStrategy?

UseDeprecatedFormat

Specifies whether the Protobuf serializer should serialize message indexes without zig-zag encoding.

default: false

Declaration
public bool? UseDeprecatedFormat { get; set; }
Property Value
Type Description
bool?

UseLatestVersion

Specifies whether or not the Protobuf serializer should use the latest subject version for serialization. WARNING: There is no check that the latest schema is backwards compatible with the schema of the object being serialized.

default: false

Declaration
public bool? UseLatestVersion { get; set; }
Property Value
Type Description
bool?

UseLatestWithMetadata

Specifies whether or not the Protobuf serializer should use the latest subject version with the given metadata for serialization. WARNING: There is no check that the latest schema is backwards compatible with the schema of the object being serialized.

Declaration
public IDictionary<string, string> UseLatestWithMetadata { get; set; }
Property Value
Type Description
IDictionary<string, string>

UseSchemaId

Specifies the schema ID to be used for serialization. WARNING: There is no check that the latest schema is backwards compatible with the schema of the object being serialized.

Declaration
public int? UseSchemaId { get; set; }
Property Value
Type Description
int?

Implements

IEnumerable<T>
IEnumerable
In this article