Class SolaceTopicIdStrategy<T,S>
- java.lang.Object
-
- com.solace.serdes.common.resolver.strategy.DestinationIdStrategy<T,S>
-
- com.solace.serdes.common.resolver.strategy.SolaceTopicIdStrategy<T,S>
-
- Type Parameters:
T
- The type of object to be serialized/deserializedS
- The type of schema
- All Implemented Interfaces:
ArtifactReferenceResolverStrategy<T,S>
public class SolaceTopicIdStrategy<T,S> extends DestinationIdStrategy<T,S>
A strategy for resolving artifact references based on Solace topic patterns.This strategy extends the DestinationIdStrategy by adding support for mapping Solace topics to specific artifact references using pattern matching. When a topic matches a configured pattern, the corresponding artifact reference is returned.
If no topic profile is provided or no pattern matches, it falls back to the behavior of the parent DestinationIdStrategy.
-
-
Constructor Summary
Constructors Constructor Description SolaceTopicIdStrategy(SolaceTopicProfile topicProfile)
Constructs a new SolaceTopicIdStrategy with the specified topic profile.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArtifactReference
artifactReference(Record<T> data, ParsedSchema<S> parsedSchema)
Resolves and returns theArtifactReference
for a given record.-
Methods inherited from class com.solace.serdes.common.resolver.strategy.DestinationIdStrategy
loadSchema
-
-
-
-
Constructor Detail
-
SolaceTopicIdStrategy
public SolaceTopicIdStrategy(SolaceTopicProfile topicProfile)
Constructs a new SolaceTopicIdStrategy with the specified topic profile.- Parameters:
topicProfile
- The profile containing topic-to-artifact mappings, or null to use default DestinationIdStrategy behavior
-
-
Method Detail
-
artifactReference
public ArtifactReference artifactReference(Record<T> data, ParsedSchema<S> parsedSchema)
Description copied from interface:ArtifactReferenceResolverStrategy
Resolves and returns theArtifactReference
for a given record. ThisArtifactReference
indicates where the schema is located or should be registered within the registry.- Specified by:
artifactReference
in interfaceArtifactReferenceResolverStrategy<T,S>
- Overrides:
artifactReference
in classDestinationIdStrategy<T,S>
- Parameters:
data
- The record for which to resolve theArtifactReference
.parsedSchema
- The schema of the record being resolved. This can be null ifArtifactReferenceResolverStrategy.loadSchema()
returns false.- Returns:
- The
ArtifactReference
under which the schema is located or should be registered.
-
-