LavinMQ::AMQP::ConsumerOffsets
Owns a stream's consumer_offsets file: an append-only log of
{consumer_tag, offset} entries used to resume consumers where they left
off. The file is compacted (via cleanup) to drop offsets that have fallen
out of the stream and to keep the file size bounded.
Constants
Size bounds for the compacted consumer_offsets file.
Constructors
Class methods
Encoded size of one {consumer_tag, offset} entry in the offsets file.
Drops the oldest (lowest position) offsets until the set fits in
max_size. Survivors are returned oldest first so rewriting them keeps
file position reflecting commit recency. Usually drops nothing.
Instance methods
Compacts the file, dropping offsets that are no longer in the stream and
capping the file size. The block yields the lowest offset still in the
stream; it is only evaluated when there is something to compact.
force skips the unchanged-floor short-circuit, for callers (store)
that need the file's capacity actually enforced, not just offsets
dropped.