Versions Compared

Key

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

...

As we want this metric to measure the time that the user takes to call poll() , we will store a long lastPollMs  in KafkaConsumer. We will calculate the elapsed time (and update lastPollMs) on every call to poll.

On each call to poll() , we will calculate the elapsed time since lastPollMs , record it in the Timer , and update lastPollMs .

Compatibility, Deprecation, and Migration Plan

...