Class ConfluentSchemaRegistryClient
java.lang.Object
org.springframework.cloud.stream.schema.registry.client.ConfluentSchemaRegistryClient
- All Implemented Interfaces:
SchemaRegistryClient
- Author:
- Vinicius Carvalho, Marius Bogoevici, Jon Archer, Tengzhou Dong
-
Constructor Summary
ConstructorsConstructorDescriptionConfluentSchemaRegistryClient(org.springframework.web.client.RestTemplate template) ConfluentSchemaRegistryClient(org.springframework.web.client.RestTemplate template, tools.jackson.databind.ObjectMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptionfetch(int id) Retrieves a schema by its identifier.fetch(SchemaReference schemaReference) Retrieves a schema by its reference (subject and version).Registers a schema with the remote repository returning the unique identifier associated with this schema.voidsetEndpoint(String endpoint)
-
Constructor Details
-
ConfluentSchemaRegistryClient
public ConfluentSchemaRegistryClient() -
ConfluentSchemaRegistryClient
public ConfluentSchemaRegistryClient(org.springframework.web.client.RestTemplate template) -
ConfluentSchemaRegistryClient
public ConfluentSchemaRegistryClient(org.springframework.web.client.RestTemplate template, tools.jackson.databind.ObjectMapper mapper)
-
-
Method Details
-
setEndpoint
-
register
Description copied from interface:SchemaRegistryClientRegisters a schema with the remote repository returning the unique identifier associated with this schema.- Specified by:
registerin interfaceSchemaRegistryClient- Parameters:
subject- the full name of the schemaformat- format of the schemaschema- string representation of the schema- Returns:
- a
SchemaRegistrationResponserepresenting the result of the operation
-
fetch
Description copied from interface:SchemaRegistryClientRetrieves a schema by its reference (subject and version).- Specified by:
fetchin interfaceSchemaRegistryClient- Parameters:
schemaReference- aSchemaReferenceused to identify the target schema.- Returns:
- schema
-
fetch
Description copied from interface:SchemaRegistryClientRetrieves a schema by its identifier.- Specified by:
fetchin interfaceSchemaRegistryClient- Parameters:
id- the id of the target schema.- Returns:
- schema
-