Hi,

I have a technical question regarding LogStartOffset MBean. Please let me
know if this is not a right forum to ask this question.

Question# I want to calculate lag in the consumer and want to create a lag
metric. I have defined jmx MBeans. I have 3 consumers running with 3
partitions each. LogStartOffset MBean gives  a value which is 3 times the
value of the offset(for ex; if the offset is 170 then it gives 510). Do I
need to define a clientId as one of the dimension to get the proper value?
Also the LogStartOffset takes some time (may be due to log retention
policy) to get the updated offset value after consumer consumes and commits
the message. Is there any other MBean available which can give me correct
LogStartOffset value?

"jmxMetrics": [
    {
      "id": "LogStartOffset",
      "objectName":
"kafka.log:name=LogStartOffset,type=Log,topic=*,partition=*",
      "attribute": “Value”,
      "metricType": "Number"
    }
  ]

Thanks,
Sonal

Reply via email to