package io.bootique.kafka.client;

import com.google.inject.Binder;
import com.google.inject.Provides;
import com.google.inject.Singleton;
import com.nhl.bootique.BQCoreModule;
import com.nhl.bootique.ConfigModule;
import com.nhl.bootique.config.ConfigurationFactory;

import java.util.logging.Level;

/**
 * @since 0.2
 */
public class KafkaClientModule extends ConfigModule {

    @Override
    public void configure(Binder binder) {
        // turn off chatty logs by default
        BQCoreModule.contributeLogLevels(binder)
                .addBinding("org.apache.kafka.clients.consumer.ConsumerConfig")
                .toInstance(Level.WARNING);
    }

    @Singleton
    @Provides
    KafkaClientFactory provideClientFactory(ConfigurationFactory configFactory) {
        return configFactory.config(KafkaClientFactoryFactory.class, configPrefix).createFactory();
    }
}

@@ -260,16 +260,130 @@
 Factory;
+%0Aimport org.apache.kafka.clients.consumer.ConsumerConfig;%0Aimport org.apache.kafka.clients.producer.ProducerConfig;
 %0A%0Aimport
@@ -667,58 +667,191 @@
 ing(
-%22org.apache.kafka.clients.consumer.ConsumerConfig%22
+ConsumerConfig.class.getName())%0A                .toInstance(Level.WARNING);%0A        BQCoreModule.contributeLogLevels(binder)%0A                .addBinding(ProducerConfig.class.getName()
 )%0A  

Integrate 0.10 producer #4