Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
TopicPartition tp = new TopicPartition("topic", 0);
HashMap<String, String> tags = new HashMap<>();
tags.put("client-id", "metricTestConsumer0");
tags.put("topic", tp.topic());
tags.put("partition", String.valueOf(tp0tp.partition());

double currentLead = kafkaConsumer.metrics().get(new MetricName(tp + ".records-lead", "consumer-fetch-manager-metrics", "", tags)).value()

...