Interface LsrcLookupService
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptiongetSchemaRegistryEndpoint(String lkcId) Get the Schema Registry endpoint and LSRC id for a given Logical Kafka Cluster.Methods inherited from interface AutoCloseable
close
-
Method Details
-
getSchemaRegistryEndpoint
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.clusteron the SR client so it adds thetarget-sr-clusterheader 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 emptyLsrcLookupException.LsrcMappingNotFoundException- if no mapping exists or endpoint is missingLsrcLookupException.LsrcLookupServiceException- if RRI client error occurs
-