Class IdentifierInterceptor

  • All Implemented Interfaces:
    io.grpc.ClientInterceptor

    public class IdentifierInterceptor
    extends Object
    implements io.grpc.ClientInterceptor
    A gRPC client interceptor that injects the server-assigned connection identifier into every outgoing RPC request's metadata.

    The identifier is obtained from ConnectResponse.getIdentifier() during the initial Connect RPC, and is used by the server (especially kite-coordinator) to associate subsequent requests with the connection-level state (e.g. cluster_id binding for resource group routing).

    This aligns Java SDK behavior with pymilvus, which implements the same mechanism via header_adder_interceptor.

    • Constructor Detail

      • IdentifierInterceptor

        public IdentifierInterceptor​(long identifier)
    • Method Detail

      • interceptCall

        public <ReqT,​RespT> io.grpc.ClientCall<ReqT,​RespT> interceptCall​(io.grpc.MethodDescriptor<ReqT,​RespT> method,
                                                                                     io.grpc.CallOptions callOptions,
                                                                                     io.grpc.Channel next)
        Specified by:
        interceptCall in interface io.grpc.ClientInterceptor