public int size() {
        return acknowledgements.size();
    }
Returns the size of the set of acknowledgements.

@return The size of the set of acknowledgements.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/Acknowledgements.java