Class ApicurioRegistryClient
java.lang.Object
ai.pipestream.registration.repository.ApicurioRegistryClient
Client for interacting with Apicurio Registry v3.
This is the secondary storage for schemas (primary is PostgreSQL).
The Apicurio v3 SDK calls are synchronous/blocking. Callers invoke these methods from virtual threads, so the blocking I/O never pins the Vert.x event loop.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRaw content + content-type of an artifact in an ARBITRARY group (e.g.static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateOrUpdateSchema(String serviceName, String version, String jsonSchema) Create or update a schema in Apicurio Registry.createOrUpdateSchemaWithArtifactBase(String artifactBase, String version, String jsonSchema) Create or update a schema with a custom artifact base name.createOrUpdateSchemaWithArtifactId(String artifactId, String version, String jsonSchema) Create or update a schema with a pre-built artifact ID.booleandeleteArtifact(String serviceName) Delete an artifact (for cleanup).getArtifactContentFromGroup(String groupId, String artifactId, String version) Fetch any artifact's raw content from a specific group.io.apicurio.registry.rest.client.models.ArtifactMetaDatagetArtifactMetadata(String serviceName) Get artifact metadata.Get schema by artifact ID (legacy naming, uses versionedArtifactId internally).getSchemaByArtifactId(String artifactId, String version) Get schema by raw artifact ID.booleanCheck if Apicurio is healthy.List<io.apicurio.registry.rest.client.models.SearchedArtifact> List all artifacts in the group (for reconciliation).
-
Constructor Details
-
ApicurioRegistryClient
public ApicurioRegistryClient()
-
-
Method Details
-
createOrUpdateSchema
public ApicurioRegistryClient.SchemaRegistrationResponse createOrUpdateSchema(String serviceName, String version, String jsonSchema) Create or update a schema in Apicurio Registry. -
createOrUpdateSchemaWithArtifactBase
public ApicurioRegistryClient.SchemaRegistrationResponse createOrUpdateSchemaWithArtifactBase(String artifactBase, String version, String jsonSchema) Create or update a schema with a custom artifact base name. The artifact ID will be built from the base name and version. -
createOrUpdateSchemaWithArtifactId
public ApicurioRegistryClient.SchemaRegistrationResponse createOrUpdateSchemaWithArtifactId(String artifactId, String version, String jsonSchema) Create or update a schema with a pre-built artifact ID. The artifactId should already include the version suffix (use versionedArtifactId to build it). -
getSchemaByArtifactId
-
getArtifactContentFromGroup
public ApicurioRegistryClient.ArtifactContent getArtifactContentFromGroup(String groupId, String artifactId, String version) Fetch any artifact's raw content from a specific group. Used by GetSchemaArtifact for protobuf descriptor artifacts, which live outsideDEFAULT_GROUP(the proto pipeline publishes them under the descriptor group, conventionally "default").- Returns:
- the content, or null when the artifact doesn't exist there
-
getSchema
-
isHealthy
public boolean isHealthy()Check if Apicurio is healthy. -
listArtifacts
List all artifacts in the group (for reconciliation). -
deleteArtifact
Delete an artifact (for cleanup). -
getArtifactMetadata
public io.apicurio.registry.rest.client.models.ArtifactMetaData getArtifactMetadata(String serviceName) Get artifact metadata. Never returns null - throws ApicurioRegistryException if metadata cannot be retrieved.
-