private void setAutoOffsetResetValue(Properties props) {
        String earliestConfigValue = "earliest";
        String latestConfigValue = "latest";

        if (props.containsKey(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG)) {
            // auto.offset.reset parameter was specified on the command line
            String autoResetOption = props.getProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG);
            if (fromBeginning() && !earliestConfigValue.equals(autoResetOption)) {
                // conflicting options - latest und earliest, throw an error
                System.err.println("Can't simultaneously specify --from-beginning and 'auto.offset.reset=" + autoResetOption + "', " +
                        "please remove one option");
                Exit.exit(1);
            }
            // nothing to do, checking for valid parameter values happens later and the specified
            // value was already copied during .putall operation
        } else {
            // no explicit value for auto.offset.reset was specified
            // if --from-beginning was specified use earliest, otherwise default to latest
            String autoResetOption = fromBeginning() ? earliestConfigValue : latestConfigValue;
            props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, autoResetOption);
        }
    }
Used to retrieve the correct value for the consumer parameter 'auto.offset.reset'.
Order of priority is:
  1. Explicitly set parameter via --consumer.property command line parameter
  2. Explicit --from-beginning given -> 'earliest'
  3. Default value of 'latest'
In case both --from-beginning and an explicit value are specified an error is thrown if these
are conflicting.
tools/src/main/java/org/apache/kafka/tools/consumer/ConsoleConsumerOptions.java