Class SchemaResolverPropertyKeys
- Namespace
- Solace.SchemaRegistry.Serdes.Core.Resolver
- Assembly
- Solace.SchemaRegistry.Serdes.Core.dll
Contains property key constants for schema resolver configuration.
public class SchemaResolverPropertyKeys
- Inheritance
-
SchemaResolverPropertyKeys
- Derived
- Inherited Members
Constructors
SchemaResolverPropertyKeys()
Initializes a new instance of the SchemaResolverPropertyKeys class.
protected SchemaResolverPropertyKeys()
Fields
ArtifactResolverStrategy
Property key for providing a custom artifact reference resolver strategy type.
public const string ArtifactResolverStrategy = "solace.registry.artifact-resolver-strategy"
Field Value
Remarks
The value can be a Type object (e.g., typeof(SolaceTopicIdStrategy<,>))
or a fully qualified type name string.
The default value is typeof(SolaceTopicIdStrategy<,>), 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(MyCustomStrategy)) - Closed constructed generic types (e.g.,
typeof(DestinationIdStrategy<string, object>))
typeof(DestinationIdStrategy<,>)) other than the default type
are not supported and will throw an ArgumentException during configuration.
- See Also
-
SolaceTopicIdStrategy<T, S>DestinationIdStrategy<T, S>
AuthPassword
Property key for the password used for Schema Registry authentication.
public const string AuthPassword = "solace.registry.auth.password"
Field Value
AuthUsername
Property key for the username used for Schema Registry authentication.
public const string AuthUsername = "solace.registry.auth.username"
Field Value
CacheLatest
Property key for controlling the caching behavior of schema lookups that use 'latest' or no version. When enabled, these lookups will create an additional cache entry to allow subsequent latest/no-version lookups to use the cache. When disabled, only the resolved version is cached, requiring subsequent latest/no-version lookups to be fetched from the registry.
public const string CacheLatest = "solace.registry.cache.cache-latest"
Field Value
Remarks
Values:
true: Creates additional cache entry for latest/no-version lookupsfalse: Only caches the resolved version
Note: This property does not affect the schema lookup result when an explicit version is specified. This property only affects caching behavior for serialization but does not apply to schema references. When using this property, schema references do not interact with the cache and are resolved by lookups to the registry.
Defaults to true.
CacheTtlMs
Property key for specifying the time-to-live (TTL) for cached schema artifacts in milliseconds. This property determines how long a schema remains valid in the cache before it needs to be fetched again from the registry on the next relevant lookup.
public const string CacheTtlMs = "solace.registry.cache.artifact-ttl-ms"
Field Value
Remarks
Special value: 0 disables caching. Schemas will be fetched from the registry on every request.
Supported types:
- TimeSpan: .NET TimeSpan object (e.g.,
TimeSpan.FromMilliseconds(5000),TimeSpan.FromSeconds(5)) - Numeric: any numeric type interpreted as milliseconds (e.g.,
5000,5000L) - String: millisecond value as a string (e.g.,
"5000")
Any positive value sets the TTL in milliseconds. A longer TTL can improve performance by reducing registry calls, but may increase the risk of using outdated schemas. A shorter TTL ensures more up-to-date schemas but may increase load on the registry.
Note: Numeric and string values must be representable as a 64-bit signed integer (long). Values exceeding this range will result in an ArgumentException during configuration.
Defaults to 30000 (30 seconds).
ExplicitArtifactArtifactId
Property key for explicitly setting the artifact ID used for querying an artifact in the registry. This property is only applicable for serializers and overrides the artifact ID returned by the IArtifactReferenceResolverStrategy<T, S>.
public const string ExplicitArtifactArtifactId = "solace.registry.artifact.explicit-artifact-id"
Field Value
ExplicitArtifactGroupId
Property key for explicitly setting the group ID used for querying an artifact in the registry. This property is only applicable for serializers and overrides the group ID returned by the IArtifactReferenceResolverStrategy<T, S>.
public const string ExplicitArtifactGroupId = "solace.registry.artifact.explicit-group-id"
Field Value
ExplicitArtifactVersion
Property key for explicitly setting the version used for querying an artifact in the registry. This property is only applicable for serializers and overrides the version returned by the IArtifactReferenceResolverStrategy<T, S>. When set, this takes precedence over FindLatestArtifact.
public const string ExplicitArtifactVersion = "solace.registry.artifact.explicit-version"
Field Value
FindLatestArtifact
Property key for enabling find-latest artifact resolution. When set to true,
the resolver will find the latest schema version from the registry by omitting
the version filter and ordering by GlobalId DESC. "Latest" refers to
the most recently uploaded version (highest GlobalId), not the highest version string.
If ExplicitArtifactVersion is also set, the explicit version takes precedence.
public const string FindLatestArtifact = "solace.registry.find-latest"
Field Value
Remarks
Defaults to false. Only applicable for serializers.
NetworkTraceEnabled
Property key for enabling or disabling HTTP network trace logging for debugging. When enabled and logger is at Debug level, logs HTTP request/response details.
public const string NetworkTraceEnabled = "solace.registry.network-trace.enabled"
Field Value
Remarks
Defaults to false. Use only for debugging purposes.
NetworkTraceMaxLogSize
Property key for specifying the maximum body size to log in bytes. Bodies larger than this limit will show a truncation message instead of full content. Only applicable when NetworkTraceEnabled is enabled.
public const string NetworkTraceMaxLogSize = "solace.registry.network-trace.max-log-size"
Field Value
Remarks
Defaults to 10240 bytes (10KB). Set to 0 to disable body logging size limits.
RegistryUrl
Property key for the URL of the Schema Registry.
public const string RegistryUrl = "solace.registry.url"
Field Value
RequestAttemptBackoffMs
Property key for specifying the backoff duration between retry attempts for schema registry requests in milliseconds. Determines how long to wait between retry attempts when a registry request fails.
public const string RequestAttemptBackoffMs = "solace.registry.request.attempt-backoff-ms"
Field Value
Remarks
Value must be non-negative (0 or greater). A value of 0 means no delay between retries. Defaults to 500 milliseconds.
RequestAttempts
Property key for specifying the number of retry attempts for schema registry requests. Determines how many times a failed registry request will be retried before throwing an exception.
public const string RequestAttempts = "solace.registry.request.attempts"
Field Value
Remarks
Value must be greater than 0. Defaults to 3.
StrategyTopicProfile
Property key for specifying an ISolaceTopicProfile object used by the SolaceTopicIdStrategy to map topics to artifact references.
public const string StrategyTopicProfile = "solace.registry.strategy-topic-profile"
Field Value
Remarks
The value should be an ISolaceTopicProfile object that defines the mapping rules between Solace topics and artifact references in the Schema Registry.
When this property is null or unset, the SolaceTopicIdStrategy will have the same behaviour as the DestinationIdStrategy.
TrustStore
Property key for specifying the trust store containing trusted X.509 certificates for SSL/TLS validation. The value should be an X509Certificate2Collection containing root CA and intermediate certificates.
public const string TrustStore = "solace.registry.trust-store.certificates"
Field Value
UseCachedOnError
Property key for controlling whether to use cached schemas when schema registry lookup errors occur. When enabled, schema resolution will use cached schemas instead of throwing exceptions. This is useful in environments where using a potentially stale schema is preferable to service interruptions.
public const string UseCachedOnError = "solace.registry.cache.use-cached-on-error"
Field Value
Remarks
Values:
true: Uses cached schemas when schema registry lookup errors occurfalse: Throws exception when schema registry lookup errors occur
Defaults to false.
ValidateCertificate
Property key for enabling or disabling certificate validation.
public const string ValidateCertificate = "solace.registry.validate-certificate"
Field Value
ValidateCertificateHostName
Property key for enabling or disabling SSL certificate hostname validation.
public const string ValidateCertificateHostName = "solace.registry.validate-certificate-hostname"