void scheduleEmit(
        String reason,
        MetadataImage image
    ) {
        resetSnapshotCounters();
        // AutoMQ inject start
        image.retain();
        // AutoMQ inject end
        eventQueue.append(() -> {
            String currentDisabledReason = disabledReason.get();
            if (currentDisabledReason != null) {
                log.error("Not emitting {} despite the fact that {} because snapshots are " +
                    "disabled; {}", image.provenance().snapshotName(), reason,
                        currentDisabledReason);
                // AutoMQ inject start
                image.release();
                // AutoMQ inject end
            } else {
                log.info("Creating new KRaft snapshot file {} because {}.",
                        image.provenance().snapshotName(), reason);
                try {
                    emitter.maybeEmit(image);
                } catch (Throwable e) {
                    faultHandler.handleFault("KRaft snapshot file generation error", e);
                } finally {
                    // AutoMQ inject start
                    image.release();
                    // AutoMQ inject end
                }
            }
        });
    }
The time at which we created the last snapshot.
metadata/src/main/java/org/apache/kafka/image/publisher/SnapshotGenerator.java