public class ProducerMetricBuilder
extends java.lang.Object
ProducerMetric instance.ProducerMetric which gives a result value related to metric associated to
the clientId.
ProducerMetric which gives a result value related to metric associated
to the clientId and a specific topic.
| Modifier and Type | Method and Description |
|---|---|
static ProducerMetric |
buildClientIdMetric(java.util.Map<MetricName,? extends org.apache.kafka.common.Metric> metrics,
java.lang.String metricAttributeName,
java.lang.String clientId)
This method builds an instance of a
ProducerMetric which gives a result value related to
metric associated to the clientId. |
static ProducerMetric |
buildClientIdTopicMetric(java.util.Map<MetricName,? extends org.apache.kafka.common.Metric> metrics,
java.lang.String metricAttributeName,
java.lang.String clientId,
TopicPartition topicPartition)
This method builds an instance of a
ProducerMetric which gives a result value related to
metric associated to an specific topic provided as a parameter associated to the clientId. |
public static ProducerMetric buildClientIdMetric(java.util.Map<MetricName,? extends org.apache.kafka.common.Metric> metrics, java.lang.String metricAttributeName, java.lang.String clientId)
ProducerMetric which gives a result value related to
metric associated to the clientId.metrics - The Kafka list metrics.metricAttributeName - The name of the Kafka metric that will be measured.clientId - The clientId associated to the producer.ProducerMetric instance.public static ProducerMetric buildClientIdTopicMetric(java.util.Map<MetricName,? extends org.apache.kafka.common.Metric> metrics, java.lang.String metricAttributeName, java.lang.String clientId, TopicPartition topicPartition)
ProducerMetric which gives a result value related to
metric associated to an specific topic provided as a parameter associated to the clientId.metrics - The Kafka list metrics.metricAttributeName - The name of the Kafka metric that will be measured.clientId - The clientId associated to the producer.topicPartition - The topicPartition which contains the topic name.ProducerMetric instance.