Interface LsrcLookupService

All Superinterfaces:
AutoCloseable

public interface LsrcLookupService extends AutoCloseable
Service for looking up Schema Registry endpoints from Resource Manager's RRI (Resource Relation Index).

Uses the LKCToLSRC resource to map Logical Kafka Cluster IDs to their corresponding Schema Registry Cluster endpoints.

Design

  • Async API: All methods return CompletableFuture to avoid blocking controller threads
  • Fail-fast: Throws specific exceptions for different failure types (see LsrcLookupException)
  • Method Details

    • getSchemaRegistryEndpoint

      CompletableFuture<LsrcLookupResult> getSchemaRegistryEndpoint(String lkcId)
      Get the Schema Registry endpoint and LSRC id for a given Logical Kafka Cluster.

      This method queries the Resource Manager's RRI LKCToLSRC resource to find the mapping from LKC to LSRC and returns both the endpoint URL and the LSRC id. Both are required by callers: the URL to address the request, and the LSRC id to set bearer.auth.logical.cluster on the SR client so it adds the target-sr-cluster header demanded by multi-tenant SR.

      Parameters:
      lkcId - the Logical Kafka Cluster ID (e.g., "lkc-abc123"), must not be null
      Returns:
      a CompletableFuture containing the Schema Registry endpoint URL and LSRC id
      Throws:
      LsrcLookupException.InvalidLkcIdException - if lkcId is null or empty
      LsrcLookupException.LsrcMappingNotFoundException - if no mapping exists or endpoint is missing
      LsrcLookupException.LsrcLookupServiceException - if RRI client error occurs