@Override protected EurekaInterestClient buildClient() { if (serverResolver == null) { throw new IllegalArgumentException("Cannot build client for discovery without read server resolver"); } BatchingRegistry<InstanceInfo> remoteBatchingRegistry = new BatchingRegistryImpl<>(); SourcedEurekaRegistry<InstanceInfo> registry = new PassThroughRegistry(remoteBatchingRegistry); ClientChannelFactory<InterestChannel> channelFactory = new InterestChannelFactory(RESOLVER_CLIENT_ID, transportConfig, serverResolver, registry, remoteBatchingRegistry, clientMetricFactory); return new EurekaInterestClientImpl(registry, channelFactory); } }