The XINFO GROUPS command takes a key (which should point to a stream) as its only argument.
This returns information for ALL consumer groups. This is wasteful and causes extra network transmission when you just want to see one group's information e.g. because you are monitoring consumer group lag for that group.
Enhance the command to take one (or more) group names as optional parameters, returning results for each group that exists and none for groups that don't.
e.g. get info for all groups:
XINFO groups somestream
Get info for one group:
XINFO groups somestream mygroup
Get info for two groups:
XINFO groups somestream mygroup myothergroup
etc.
Comment From: hwware
Hi @simonprickett , I think its a good idea, I can work on submitting the PR for that. @oranagra WDYT?
Comment From: itamarhaber
I also agree it would be good idea to have a way to filter the output by group name(s). In terms of API, I think something like the following will work, with "*" being the default pattern:
XINFO GROUPS <key> [pattern [pattern]...]
- patterns are evaluated by order, single match sufficiant
Comment From: hwware
Thank you @itamarhaber for your input, I will work on this and create a PR.