@Override
    public void disconnect(String nodeId) {
        if (connectionStates.isDisconnected(nodeId)) {
            log.debug("Client requested disconnect from node {}, which is already disconnected", nodeId);
            return;
        }

        log.info("Client requested disconnect from node {}", nodeId);
        selector.close(nodeId);
        long now = time.milliseconds();
        cancelInFlightRequests(nodeId, now, abortedSends, false);
        connectionStates.disconnected(nodeId, now);
    }
Disconnects the connection to a particular node, if there is one.
Any pending ClientRequests for this connection will receive disconnections.

@param nodeId The id of the node
clients/src/main/java/org/apache/kafka/clients/NetworkClient.java