public boolean hasAvailableFetches() {
        return fetchBuffer.hasCompletedFetches(fetch -> subscriptions.isFetchable(fetch.partition));
    }
Return whether we have any completed fetches that are fetchable. This method is thread-safe.
@return true if there are completed fetches that can be returned, false otherwise
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractFetch.java