public void resetOffset(long startMillis, long intervalMillis, int percentage) {
        AtomicLong timestamp = new AtomicLong(startMillis);
        int size = groups.size();
        int consumersToActivate = (int) Math.ceil(size * (percentage / 100.0));
        consumersToActivate = Math.max(1, Math.min(size, consumersToActivate)); // Ensure at least 1 and at most size
        
        LOGGER.info("Activating {}% of consumers ({} out of {})", percentage, consumersToActivate, size);
        
        for (int i = 0; i < consumersToActivate; i++) {
            Group group = groups.get(i);
            group.seek(timestamp.getAndAdd(intervalMillis));
            LOGGER.info("Reset consumer group offsets: {}/{}", i + 1, consumersToActivate);
        }
        
        // Keep the remaining consumers paused
        if (consumersToActivate < size) {
            LOGGER.info("Keeping {} consumer groups paused during catch-up", size - consumersToActivate);
        }
    }
Reset consumer offsets for catch-up reading.

@param startMillis     The timestamp to start seeking from
@param intervalMillis  The interval between group starts
@param percentage      The percentage of consumers to activate (0-100)
tools/src/main/java/org/apache/kafka/tools/automq/perf/ConsumerService.java