public double metricValue(String name) {
        for (Map.Entry<MetricName, KafkaMetric> entry : metrics.metrics().entrySet()) {
            if (entry.getKey().name().equals(name))
                return (double) entry.getValue().metricValue();
        }
        throw new IllegalStateException("Metric not found, " + name + ", found=" + metrics.metrics().keySet());
    }
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