Skip to content

Instantly share code, notes, and snippets.

@gaborgsomogyi
Last active May 20, 2019 11:06
Show Gist options
  • Save gaborgsomogyi/2fed616e8b639096df7b57ee665f9646 to your computer and use it in GitHub Desktop.
Save gaborgsomogyi/2fed616e8b639096df7b57ee665f9646 to your computer and use it in GitHub Desktop.

Lag calculation

The lag in Kafka topic calculated in the following way: endOffsets - committedOffsets

endOffsets

To fetch this the following steps can be made:

committedOffsets

This can be fetched with AdminClient listConsumerGroupOffsets(java.lang.String groupId) API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment