class ConfigUtil {

    public static Properties toConsumerConfig(Config config) {
        val keys = new String[]{
            ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG,
            ConsumerConfig.GROUP_ID_CONFIG,
            ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG,
            ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG
        };
        val props = new Properties();
        copyProps(config, props, keys);
        return props;
    }

}