Stream
XINFO
Returns information about streams, consumer groups, and consumers.
Arguments
keybodystringrequired
The key of the stream.
optionsbodyobjectrequired
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
List groups
const result = await redis.xinfo("mystream", { type: "GROUPS"});List consumers
const result = await redis.xinfo("mystream", { type: "CONSUMERS", group: "mygroup"});// 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 }]