com.jashmore.sqs.extensions.registry.ProducerSchemaRetriever Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-cloud-schema-registry-extension-api Show documentation
Show all versions of spring-cloud-schema-registry-extension-api Show documentation
API for building a payload parser that has been serialized via the schema registered in the Spring Cloud Schema Registry
package com.jashmore.sqs.extensions.registry;
import com.jashmore.documentation.annotations.ThreadSafe;
import org.springframework.cloud.schema.registry.SchemaReference;
/**
* Used to obtain the schema for a message that was sent from a producer.
*
* @param the type of the schema, for example an Avro schema
*/
@ThreadSafe
@FunctionalInterface
public interface ProducerSchemaRetriever {
/**
* Given the schema reference, obtain the Schema that represents the payload that was sent from the producer.
*
* For example, given that it is an object of type "Signal.v2", return the schema for this so the consumer
* will know how to transform this to the version that they have defined, e.g. "Signal.v3".
*
* @param reference the reference to the schema that the producer was using
* @return the schema definition
* @throws ProducerSchemaRetrieverException when there was an error getting the schema
*/
T getSchema(SchemaReference reference) throws ProducerSchemaRetrieverException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy