public static Metrics createMetrics(ConsumerConfig config, Time time) {
        return createMetrics(config, time, CommonClientConfigs.metricsReporters(
                config.getString(ConsumerConfig.CLIENT_ID_CONFIG), config));
    }
A fixed, large enough value will suffice for max.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerUtils.java