All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jashmore.sqs.extensions.registry.ProducerSchemaRetriever Maven / Gradle / Ivy

Go to download

API for building a payload parser that has been serialized via the schema registered in the Spring Cloud Schema Registry

There is a newer version: 7.0.0
Show newest version
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