GitHub user Yangsx-1 added a comment to the discussion: Talks about the design of consumer group in stream
Here are my designs for storing consumer group, consumer and PEL. The consumer group and PEL should be stored separately. For consumer group: Key: `stream name + consumer group name(something like streamname_CGname, e.g., using underscore to combine the two name as a single key)` Metadata: `StreamEntryID last_id; // Last delivered (not acknowledged) ID for this group.` `int64_t entries_read = 0;` Subkey: `consumer name` Value: `seen_time /* Last time this consumer was active. */` For PEL: Key: `stream name + consumer group name + StreamEntryID` The key could be simplified to only `StreamEntryID` if the `StreamEntryID` hardly repeat. Metadata: `delivery_time; /* Last time this message was delivered. */` `delivery_count; /* Number of times this message was delivered.*/` Subkey: `consumer name` Is this design ok? @git-hulk @PragmaTwice @torwig GitHub link: https://github.com/apache/kvrocks/discussions/1654#discussioncomment-6787283 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
