Class SolaceTopicIdStrategy<T, S>
- Assembly
- Solace.SchemaRegistry.Serdes.Core.dll
A strategy for resolving artifact references based on Solace topic patterns.
public class SolaceTopicIdStrategy<T, S> : DestinationIdStrategy<T, S>, IArtifactReferenceResolverStrategy<T, S>
Type Parameters
TThe type of object to be serialized
SThe type of schema
- Inheritance
-
DestinationIdStrategy<T, S>SolaceTopicIdStrategy<T, S>
- Implements
- Inherited Members
Remarks
This strategy extends DestinationIdStrategy<T, S> to provide additional topic-based resolution capabilities using Solace topic profiles. When no topic profile is configured, it behaves identically to DestinationIdStrategy<T, S>.
This is the default artifact reference resolver strategy for schema resolution operations.
Constructors
SolaceTopicIdStrategy()
Constructs a new SolaceTopicIdStrategy<T, S> with no topic profile.
public SolaceTopicIdStrategy()
Remarks
When constructed without a topic profile, this strategy behaves identically to DestinationIdStrategy<T, S>.
SolaceTopicIdStrategy(ISolaceTopicProfile)
Constructs a new SolaceTopicIdStrategy<T, S> with the specified topic profile.
public SolaceTopicIdStrategy(ISolaceTopicProfile topicProfile)
Parameters
topicProfileISolaceTopicProfileThe profile containing topic-to-artifact mappings, or null to use default DestinationIdStrategy<T, S> behavior.
Methods
ResolveArtifactReference(IRecord<T>, IParsedSchema<S>)
Resolves an artifact reference using topic pattern matching from the configured profile, or falls back to destination-based resolution if no profile is configured.
public override IArtifactReference ResolveArtifactReference(IRecord<T> data, IParsedSchema<S> schema)
Parameters
dataIRecord<T>The data record containing the metadata with destination name.
schemaIParsedSchema<S>The parsed schema (not used by this strategy).
Returns
- IArtifactReference
An IArtifactReference resolved from the first matching topic pattern, or from the destination name if no profile is configured.
Exceptions
- ArgumentNullException
Thrown when metadata is null.
- ArgumentException
Thrown when the destination name is null or empty, or when no mapping matches the destination.