By tracking these offsets we can skip awaiting already completed commits from the rebalance listener in #1098.
To prevent unbounded memory usage, after a rebalance we remove the committed offset for partitions that are no longer assigned to this consumer.
Note that a commit might complete just after a partition was revoked. This is not a big issue; the offset will still be removed in the next rebalance. When the rebalanceSafeCommits feature is available (see #1098) commits will complete in the rebalance listener and this cannot happen anymore.
By tracking these offsets we can skip awaiting already completed commits from the rebalance listener in #1098.
To prevent unbounded memory usage, after a rebalance we remove the committed offset for partitions that are no longer assigned to this consumer.
Note that a commit might complete just after a partition was revoked. This is not a big issue; the offset will still be removed in the next rebalance. When the
rebalanceSafeCommits
feature is available (see #1098) commits will complete in the rebalance listener and this cannot happen anymore.