Skip to main content

Arguments

key
string
required
The key of the stream.
options
object
required
The XINFO subcommand options. Can be one of:

Response

The return type depends on the subcommand:
  • GROUPS: Returns an array of consumer group information
  • CONSUMERS: Returns an array of consumer information
const result = await redis.xinfo("mystream", {
  type: "GROUPS"
});
// GROUPS response
[
  {
    name: "mygroup",
    consumers: 2,
    pending: 1,
    "last-delivered-id": "1638360173533-2",
    "entries-read": 3,
    lag: 2
  }
]

// CONSUMERS response
[
  {
    name: "consumer1",
    pending: 1,
    idle: 15000,
    "inactive": 15000
  }
]
I