Class SerdePropertyKeys
- Namespace
- Solace.SchemaRegistry.Serdes.Core
- Assembly
- Solace.SchemaRegistry.Serdes.Core.dll
Contains property key constants for SERDES configuration. Inherits schema resolver property keys from SchemaResolverPropertyKeys.
public class SerdePropertyKeys : SchemaResolverPropertyKeys
- Inheritance
-
SerdePropertyKeys
- Derived
- Inherited Members
Constructors
SerdePropertyKeys()
Initializes a new instance of the SerdePropertyKeys class.
protected SerdePropertyKeys()
Fields
SchemaHeaderIdentifiers
Property key for setting one or more schema header identifiers to be encoded in the serializer headers.
public const string SchemaHeaderIdentifiers = "solace.registry.schema-header-identifiers"
Field Value
Remarks
This property configures which schema identifier format(s) will be written to message headers during serialization. The property only impacts serializers and has no effect on deserializers.
The value associated with this key can be:
- A string representation of a SchemaHeaderId enum constant
- A SchemaHeaderId enum value
- A HashSet<T> of SchemaHeaderId enum values for multiple identifiers
The default value is SchemaId.
Example usage:
// Using a string for a single identifier
properties[SerdePropertyKeys.SchemaHeaderIdentifiers] = "SchemaIdString";
// Using an enum constant for a single identifier
properties[SerdePropertyKeys.SchemaHeaderIdentifiers] = SchemaHeaderId.SchemaIdString;
// Using a collection for multiple identifiers
properties[SerdePropertyKeys.SchemaHeaderIdentifiers] = new HashSet<SchemaHeaderId>
{
SchemaHeaderId.SchemaId,
SchemaHeaderId.SchemaIdString
};
- See Also
SchemaResolver
Property key for providing a custom schema resolver type.
public const string SchemaResolver = "solace.registry.schema-resolver"
Field Value
Remarks
The value can be a Type object (e.g., typeof(CustomSchemaResolver<,>))
or a fully qualified type name string (e.g., "MyNamespace.CustomSchemaResolver`2, MyAssembly").
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>))
typeof(MyCustomResolver<,>)) other than the default type
are not supported and will throw an ArgumentException during configuration.
- See Also
-
ISchemaResolver<S, T>DefaultSchemaResolver<S, T>