Why are XACK, XAUTOCLAIM, XCLAIM, XPENDING, XREADGROUP not in the XGROUP container?

Comment From: oranagra

@addos i don't think i understand the question, please provide a more detailed explanation, maybe include an example.

Comment From: addos

XGROUP summary: A container for consumer groups commands since: 5.0.0


Under XGROUP there are several consumer group commands:

XGROUP CREATE key groupname id|$ [MKSTREAM] [ENTRIESREAD entries_read] summary: Create a consumer group. since: 5.0.0

XGROUP CREATECONSUMER key groupname consumername summary: Create a consumer in a consumer group. since: 6.2.0

XGROUP DELCONSUMER key groupname consumername summary: Delete a consumer from a consumer group. since: 5.0.0

XGROUP DESTROY key groupname summary: Destroy a consumer group. since: 5.0.0

XGROUP HELP summary: Show helpful text about the different subcommands since: 5.0.0

XGROUP SETID key groupname id|$ [ENTRIESREAD entries_read] summary: Set a consumer group to an arbitrary last delivered ID value. since: 5.0.0


These are consumer group commands but are NOT in the XGROUP container. So basically why are these commands not prefixed with XGROUP to indicate they are XGROUP commands?

XACK key group id [id ...] summary: Marks a pending message as correctly processed, effectively removing it from the pending entries list of the consumer group. Return value of the command is the number of messages successfully acknowledged, that is, the IDs we were actually able to resolve in the PEL. since: 5.0.0

XAUTOCLAIM key group consumer min-idle-time start [COUNT count] [JUSTID] summary: Changes (or acquires) ownership of messages in a consumer group, as if the messages were delivered to the specified consumer. since: 6.2.0

XCLAIM key group consumer min-idle-time id [id ...] [IDLE ms] [TIME unix-time-milliseconds] [RETRYCOUNT count] [FORCE] [JUSTID] summary: Changes (or acquires) ownership of a message in a consumer group, as if the message was delivered to the specified consumer. since: 5.0.0

XPENDING key group [[IDLE min-idle-time] start end count [consumer]] summary: Return information and entries from a stream consumer group pending entries list, that are messages fetched but never acknowledged. since: 5.0.0

XREADGROUP GROUP group consumer [COUNT count] [BLOCK milliseconds] [NOACK] STREAMS key [key ...] id [id ...] summary: Return new entries from a stream using a consumer group, or access the history of the pending entries for a given consumer. Can block. since: 5.0.0

Comment From: oranagra

you mean why do we have a top-level command named XACK, and why it's not an XGROUP ACK command instead? AFAIK the XGROUP command manipulates the group or it's consumers, and is not about the data (stream records). while XACK and XREADGROUP etc, are about the records themselves.

Comment From: addos

ok, I guess it is confusing, because these commands are group commands. So to me, it would have made sense for them to be in the XGROUP container.

Comment From: oranagra

in any case, that's water under the bridge now...