Package com.datasift.dropwizard.kafka.producer

Examples of com.datasift.dropwizard.kafka.producer.ManagedProducer


    public <K, T> KafkaProducer<K, T> build(final Encoder<T> encoder,
                                            final Partitioner<K> partitioner,
                                            final Environment environment,
                                            final String name) {
        final KafkaProducer<K, T> producer = build(encoder, partitioner);
        environment.lifecycle().manage(new ManagedProducer(producer));
        return new InstrumentedProducer<>(producer, environment.metrics(), name);
    }
View Full Code Here


                                       final Class<? extends Encoder<V>> messageEncoder,
                                       final Class<Partitioner> partitioner,
                                       final Environment environment,
                                       final String name) {
        final Producer<K, V> producer = build(keyEncoder, messageEncoder, partitioner, name);
        environment.lifecycle().manage(new ManagedProducer(producer));
        return new InstrumentedProducer<>(
                producer,
                environment.metrics(),
                name);
    }
View Full Code Here

TOP

Related Classes of com.datasift.dropwizard.kafka.producer.ManagedProducer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.