Search in sources :

Example 1 with ProducerCollector

use of io.confluent.ksql.metrics.ProducerCollector in project ksql by confluentinc.

the class KsqlEngineMetricsTest method produceMessages.

private void produceMessages(final int numMessages) {
    final ProducerCollector collector1 = new ProducerCollector();
    collector1.configure(ImmutableMap.of(ProducerConfig.CLIENT_ID_CONFIG, "client1", KsqlConfig.KSQL_INTERNAL_METRIC_COLLECTORS_CONFIG, metricCollectors));
    for (int i = 0; i < numMessages; i++) {
        collector1.onSend(new ProducerRecord<>("foo", "key", Integer.toString(i)));
    }
}
Also used : ProducerCollector(io.confluent.ksql.metrics.ProducerCollector)

Aggregations

ProducerCollector (io.confluent.ksql.metrics.ProducerCollector)1