private boolean hasCompletedReceive(KafkaChannel channel) {
        return completedReceives.containsKey(channel.id());
    }
Check if given channel has a completed receive
clients/src/main/java/org/apache/kafka/common/network/Selector.java