TANK icon indicating copy to clipboard operation
TANK copied to clipboard

Consumer Offsets, support via internal topic/partition

Open markpapadakis opened this issue 9 years ago • 1 comments

According to @miguno ( I need to go through the Kafka codebase to figure out what they do exactly ), they are maintaining an internal/special-purpose topic __consumer_offsets, where the policy is configured as cleanup, because they only really care for the last value, and, presumably, on startup, the partition is replayed in order to restore the state.

That's a clever and pragmatic way to implement it.

See also: http://www.slideshare.net/jjkoshy/offset-management-in-kafka

markpapadakis avatar Aug 26 '16 09:08 markpapadakis

See: https://www.ctheu.com/2017/08/07/looking-at-kafka-s-consumers-offsets/

A new topic_partition::foreach_msg() has been implemented and can be used to effortlessly iterate across all messages, both in the RO segments and the current RW segment. This can be used to materialize state by iterating all messages in, say, __consumer_offsets partitions.

markpapadakis avatar Oct 09 '17 11:10 markpapadakis