kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Azama <eazama...@gmail.com>
Subject Re: What is the node-id tag in kafka producer MetricName ?
Date Wed, 04 Dec 2019 06:29:52 GMT
Nodes with a negative id refer to the bootstrap servers you configured the
client with.

There are also metrics that report for nodes with an extremely large node
id. These are usually Integer.MAX_VALUE - (coordinator node id)

On Tue, Dec 3, 2019 at 1:37 PM Rajkumar Natarajan <raj.cs.psg@gmail.com>
wrote:

> I've have kafka producer running same code from 3 different linux servers
> sending messages to same kafka cluster topic. Below is the sample code -
>
>     KafkaProducer<?, byte[]> producer = new KafkaProducer<?,
> byte[]>(props);
>     Map<MetricName, ? extends Metric> metrics =  producer.metrics();
>     System.out.println(metrics.keySet());
>
> The sample of the MetricName produced by the above code  from one of the
> server -
>
> MetricName [name=request-rate, group=producer-node-metrics, description=The
> number of requests sent per second, tags={client-id=ImpLog,
> node-id=node--3}],
>
> MetricName [name=request-rate, group=producer-node-metrics, description=The
> number of requests sent per second, tags={client-id=ImpLog,
> node-id=node--2}],
>
> MetricName [name=request-rate, group=producer-node-metrics, description=The
> number of requests sent per second, tags={client-id=ImpLog,
> node-id=node--1}],
>
> MetricName [name=request-total, group=producer-node-metrics,
> description=The total number of requests sent, tags={client-id=ImpLog,
> node-id=node--1}],
>
> So my question is what is node-id=node--3 tag of the kafka producer
> MetricName. Is it identifies the kafka producer metircs to one of the kafka
> broker instance?
>
>
> I've asked this question in SO
>
> https://stackoverflow.com/questions/59132349/what-is-the-node-id-tag-in-kafka-producer-metricname-for-and-how-can-i-get-it-fr
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message