Class ApicurioRegistryClient

java.lang.Object
ai.pipestream.registration.repository.ApicurioRegistryClient

@ApplicationScoped public class ApicurioRegistryClient extends Object
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.

  • 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

      public String getSchemaByArtifactId(String artifactId, String version)
      Get schema by raw artifact ID.
    • 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 outside DEFAULT_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

      public String getSchema(String serviceName, String version)
      Get schema by artifact ID (legacy naming, uses versionedArtifactId internally).
    • isHealthy

      public boolean isHealthy()
      Check if Apicurio is healthy.
    • listArtifacts

      public List<io.apicurio.registry.rest.client.models.SearchedArtifact> listArtifacts()
      List all artifacts in the group (for reconciliation).
    • deleteArtifact

      public boolean deleteArtifact(String serviceName)
      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.