private String id(SocketChannel channel) {
        String connectionId = Selector.generateConnectionId(channel.socket(), nextConnectionIndex);
        if (nextConnectionIndex == Integer.MAX_VALUE)
            nextConnectionIndex = 0;
        else
            nextConnectionIndex = nextConnectionIndex + 1;
        return connectionId;
    }
Non-blocking EchoServer implementation that uses ChannelBuilder to create channels
with the configured security protocol.
clients/src/test/java/org/apache/kafka/common/network/NioEchoServer.java