Dear Redis Team,

Can you clarify the reasoning behind this!?

Let's imagine I have few streams called mystream1, mystream2, mystream3.

I create a group called mygroup. This group already knows what stream to consume and from which id.

XGROUP CREATE mystream1 mygroup 0

Now to read the group.

XREADGROUP GROUP mygroup instance1 STREAMS mystream1 >

Questions:

  • what is the significance of streams here? is the group name not enough as it already knows the stream keys? XREADGROUP GROUP mygroup instance1 STREAMS mystream1 >

  • if your answer is going to be - XREADGROUP can read from more than 1 stream, then why do you have stream name in the group creation? Do you not think that it is redundant?

Comment From: oranagra

@kitkars the group is part of the stream, not the other way around. It's a group of consumers, not a group of streams.
You can create similar group names in different streams, but that doesn't really makes them the same group.

So, since there's no global Metadata about streams, and instead each key holds the Metadata for itself, we must get a key name to operate on first, and only then look for the group.