private void ensureExplicitAcknowledgement() {
        if (acknowledgementMode == AcknowledgementMode.PENDING) {
            // If poll(Duration) has been called once, moves into EXPLICIT
            acknowledgementMode = AcknowledgementMode.EXPLICIT;
        } else if (acknowledgementMode == AcknowledgementMode.IMPLICIT) {
            throw new IllegalStateException("Implicit acknowledgement of delivery is being used.");
        } else if (acknowledgementMode == AcknowledgementMode.UNKNOWN) {
            throw new IllegalStateException("Acknowledge called before poll.");
        }
    }
Called to move the acknowledgement mode into EXPLICIT, if it is not known to be IMPLICIT.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumerImpl.java