Table of Contents

Class SerdeProperties

Namespace
Solace.SchemaRegistry.Serdes.Core
Assembly
Solace.SchemaRegistry.Serdes.Core.dll

Represents configuration properties for schema registry serializers and deserializers. This class extends SchemaResolverProperties to provide SERDES-specific configuration options for schema registry operations.

public class SerdeProperties : SchemaResolverProperties
Inheritance
SerdeProperties
Derived
Inherited Members

Remarks

SerdeProperties encapsulates all configuration settings needed for schema registry-based serialization and deserialization operations. It inherits all schema resolution properties from the base class and can be extended with additional SERDES-specific configurations.

Use this class to configure serializers and deserializers with schema registry connection details, authentication credentials, and other operational parameters.

Constructors

SerdeProperties(IDictionary<string, object>)

Initializes a new instance of the SerdeProperties class with the specified configuration dictionary.

protected SerdeProperties(IDictionary<string, object> configuration)

Parameters

configuration IDictionary<string, object>

A dictionary containing configuration key-value pairs. Required properties must be provided.

Exceptions

ArgumentNullException

Thrown when configuration is null

Properties

SchemaHeaderIdentifiers

Retrieves the schema header identifiers as specified in the configuration.

public HashSet<SchemaHeaderId> SchemaHeaderIdentifiers { get; }

Property Value

HashSet<SchemaHeaderId>

A HashSet<T> of SchemaHeaderId values representing the configured schema header identifiers.

See Also

SchemaResolverType

Retrieves the schema resolver type from configuration.

public Type SchemaResolverType { get; }

Property Value

Type

The Type of the schema resolver to use.

Remarks

The value can be either a Type object or a string representing a fully qualified type name.

The default value is typeof(DefaultSchemaResolver<,>), which is special-cased and will be automatically closed with the appropriate type arguments during instantiation.

Important: When providing any type other than the default, only the following are supported:

  • Non-generic types (e.g., typeof(MyCustomResolver))
  • Closed constructed generic types (e.g., typeof(MyCustomResolver<string, object>))
Open generic types (e.g., typeof(MyCustomResolver<,>)) other than the default type are not supported and will throw an ArgumentException during configuration.

Methods

CreateSchemaResolver<S, T>(Type)

Creates a schema resolver instance from the specified type.

public static ISchemaResolver<S, T> CreateSchemaResolver<S, T>(Type resolverType)

Parameters

resolverType Type

The generic type definition of the schema resolver (e.g., typeof(DefaultSchemaResolver<,>))

Returns

ISchemaResolver<S, T>

A new instance of the schema resolver with the appropriate type parameters

Type Parameters

S

The schema type

T

The data type

Exceptions

ArgumentNullException

Thrown when resolverType is null

ArgumentException

Thrown when the type cannot be instantiated or does not implement the required interface

FromDictionary(IDictionary<string, object>)

Creates a new SerdeProperties instance with the specified configuration.

public static SerdeProperties FromDictionary(IDictionary<string, object> configuration)

Parameters

configuration IDictionary<string, object>

A dictionary containing configuration key-value pairs. Required properties must be provided.

Returns

SerdeProperties

A fully initialized SerdeProperties instance.

Exceptions

ArgumentNullException

Thrown when configuration is null

ArgumentException

Thrown when the configuration contains invalid property values, or required properties are missing

GetDefaults()

Gets a copy of the default SERDES properties, including both base resolver defaults and SERDES-specific defaults.

protected override IDictionary<string, object> GetDefaults()

Returns

IDictionary<string, object>

A new IDictionary<TKey, TValue> containing the default SERDES property values combined with base SchemaResolverProperties defaults.

Remarks

The returned dictionary also includes defaults from the base SchemaResolverProperties class. Each call returns a new dictionary instance, so modifications to the returned dictionary will not affect future calls to this method.

See Also

LoadFromConfig()

Loads SERDES-specific configuration values into properties. Called during construction. Calls base implementation first.

protected override void LoadFromConfig()

See Also