public boolean addIfAbsent(long offset, AcknowledgeType type) {
        return acknowledgements.putIfAbsent(offset, type) == null;
    }
Adds an acknowledgement for a specific offset. Will <b>not</b> overwrite an existing
acknowledgement for the same offset.

@param offset The record offset.
@param type   The AcknowledgeType.

@return Whether the acknowledgement was added.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/Acknowledgements.java