class ConfigUtil {

    public static Properties toProducerConfig(Config config) {
        val keys = new String[]{
            ProducerConfig.BOOTSTRAP_SERVERS_CONFIG,
            ProducerConfig.CLIENT_ID_CONFIG,
            ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG,
            ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG
        };
        val props = new Properties();
        copyProps(config, props, keys);
        return props;
    }

}