DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
Currently, each partition's internal state tracks whether it is paused with a simple boolean flag. To support the `partition`paused-pausedpartitions-timeduration-ms` seconds` metric, this KIP adds a timestamp that records when the partition was paused. The timestamp is set when `pausepause() ` is called and , cleared (reset to ` -1`1) when `resumeresume() ` is called. This allows the metric layer to compute the elapsed pause duration on demand, without requiring a background timer or periodic sampling, and also reset to -1 on partition reassignment regardless of prior pause status. This ensures that a partition re-assigned to the same consumer after a rebalance starts with a clean pause state.
consumer-metrics
A `paused-partitions-count` gauge is registered in the consumer's top-level metrics. When queried, this gauge computes the current count of paused partitions by reading from the consumer's subscription state. Since the consumer already maintains the set of paused partitions internally, no additional data structures are needed for this metric.
consumer-fetch-manager-metrics
The `partition`paused-paused` partitions` and `partition`paused-pausedpartitions-timeduration-ms` seconds` gauges are registered per partition in the fetch manager metrics, alongside the existing per-partition lag and lead metrics. They follow the same lifecycle:
...
- Verify that the pause timestamp is set when `pause()` is called, cleared on `resume()`, and reset on partition reassignment.
- Verify that the `paused-partitions-count` metric is registered and returns the correct count as partitions are paused and resumed.
- Verify that `partition`paused-paused` partitions` and `partition`paused-pausedpartitions-timeduration-ms` seconds` metrics are registered per partition, return correct values, and are removed when partitions are revoked.
...