static int loadRequiredIntProp(
        Properties props,
        String keyName
    ) {
        String value = props.getProperty(keyName);
        if (value == null) {
            throw new RuntimeException("Failed to find " + keyName);
        }
        try {
            return Integer.parseInt(value);
        } catch (NumberFormatException e) {
            throw new RuntimeException("Unable to read " + keyName + " as a base-10 number.", e);
        }
    }
Pull an integer from a Properties object.

@param props     The Properties object.
@param keyName   The key to look for.

@return          The integer.
metadata/src/main/java/org/apache/kafka/metadata/properties/PropertiesUtils.java