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).
  • Constructor Details

    • ApicurioRegistryClient

      public ApicurioRegistryClient()
  • Method Details

    • createOrUpdateSchema

      public io.smallrye.mutiny.Uni<ApicurioRegistryClient.SchemaRegistrationResponse> createOrUpdateSchema(String serviceName, String version, String jsonSchema)
      Create or update a schema in Apicurio Registry
    • createOrUpdateSchemaWithArtifactBase

      public io.smallrye.mutiny.Uni<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 io.smallrye.mutiny.Uni<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 io.smallrye.mutiny.Uni<String> getSchemaByArtifactId(String artifactId, String version)
      Get schema by raw artifact ID
    • getSchema

      public io.smallrye.mutiny.Uni<String> getSchema(String serviceName, String version)
      Get schema by artifact ID (legacy naming, uses versionedArtifactId internally)
    • isHealthy

      public io.smallrye.mutiny.Uni<Boolean> isHealthy()
      Check if Apicurio is healthy
    • listArtifacts

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

      public io.smallrye.mutiny.Uni<Boolean> deleteArtifact(String serviceName)
      Delete an artifact (for cleanup)
    • getArtifactMetadata

      public io.smallrye.mutiny.Uni<io.apicurio.registry.rest.client.models.ArtifactMetaData> getArtifactMetadata(String serviceName)
      Get artifact metadata Never returns null - returns a failed Uni if metadata cannot be retrieved.