synchronized public void init(VerifiableProperties props) {
if (!initialized) {
this.props = props;
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());
}
}