@Override
    public Client getClient(NodeAddrInfo addressInfo, RpcConfig conf) throws Exception {
        Client client = clients.get(addressInfo.getHostPortStr());
        // use the cache network client
        if (client != null && client.isReady()) {
            return client;
        }
        synchronized (this) {
            // check client has been build already
            client = clients.get(addressInfo.getHostPortStr());
            if (client != null && client.isReady()) {
                return client;
            }

            // clean and build a new network client
            if (client != null) {
                client = clients.remove(addressInfo.getHostPortStr());
                if (client != null) {
                    client.close();
                }
                client = null;
            }
            int connectTimeout = conf.getInt(RpcConstants.CONNECT_TIMEOUT, 3000);
            try {
                client = createClient(addressInfo, connectTimeout, conf);
                Client existClient =
                        clients.putIfAbsent(addressInfo.getHostPortStr(), client);
                if (existClient != null) {
                    client.close(false);
                    client = existClient;
                }
            } catch (Exception e) {
                if (client != null) {
                    client.close(false);
                }
                throw e;
            } catch (Throwable ee) {
                if (client != null) {
                    client.close(false);
                }
                throw new Exception(ee);
            }
        }
        return client;
    }
initial the network by rpc config object

@param conf      the configure information
@throws IllegalArgumentException  the exception while configuring object
inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corerpc/netty/NettyClientFactory.java