Package kafka.producer

Examples of kafka.producer.ProducerConfig


        this.registry = registry;
        mapper = new ObjectMapper().registerModule(new MetricsModule(rateUnit,
                                                                     durationUnit,
                                                                     false));
        this.kafkaTopic = kafkaTopic;
        kafkaProducer = new Producer<String, String>(new ProducerConfig(kafkaProperties));
    }
View Full Code Here


            props.props().put("metadata.broker.list", String.format("%s:%d", "localhost", props.getInt("port")));

            final KafkaMetricsConfig metricsConfig = new KafkaMetricsConfig(props);

            this.underlying = new TopicReporter(Metrics.defaultRegistry(),
                    new ProducerConfig(props.props()),
                    "broker%s".format(props.getString("broker.id")));
            initialized = true;
            startReporter(metricsConfig.pollingIntervalSecs());
        }
    }
View Full Code Here

    public synchronized void stopReporter() {
        if (initialized && running) {
            underlying.shutdown();
            running = false;
            log.info("Stopped Kafka Topic metrics reporter");
            underlying = new TopicReporter(Metrics.defaultRegistry(), new ProducerConfig(props.props()), String.format("broker%s", props.getString("broker.id")));
        }
    }
View Full Code Here

TOP

Related Classes of kafka.producer.ProducerConfig

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.