{
  "schema_version": 2,
  "id": "commands/xinfo-consumers",
  "title": "XINFO CONSUMERS",
  "url": "https://redis.io/docs/latest/commands/xinfo-consumers/",
  "summary": "Returns a list of the consumers in a consumer group.",
  "since": "5.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T16:45:25+01:00",
  "page_type": "content",
  "content_hash": "ad328735bd9b15f5bf886d41ab8cc4faf7b1003de7cef01662e388888c8b8a06",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "This command returns the list of consumers that belong to the `groupname` consumer group of the stream stored at `key`.\n\nThe following information is provided for each consumer in the group:\n\n* **name**: the consumer's name\n* **pending**: the number of entries in the PEL: pending messages for the consumer, which are messages that were delivered but are yet to be acknowledged\n* **idle**: the number of milliseconds that have passed since the consumer's last attempted interaction (Examples: [`XREADGROUP`](https://redis.io/docs/latest/commands/xreadgroup), [`XCLAIM`](https://redis.io/docs/latest/commands/xclaim), [`XAUTOCLAIM`](https://redis.io/docs/latest/commands/xautoclaim))\n* **inactive**: the number of milliseconds that have passed since the consumer's last successful interaction (Examples: [`XREADGROUP`](https://redis.io/docs/latest/commands/xreadgroup) that actually read some entries into the PEL, [`XCLAIM`](https://redis.io/docs/latest/commands/xclaim)/[`XAUTOCLAIM`](https://redis.io/docs/latest/commands/xautoclaim) that actually claimed some entries)\n\nNote that before Redis 7.2.0, **idle** used to denote the time passed since last successful interaction.\nIn 7.2.0, **inactive** was added and **idle** was changed to denote the time passed since last attempted interaction."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary>\n\nThe stream key.\n\n</details>\n\n<details open><summary><code>group</code></summary>\n\nThe consumer group name.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "[code example]"
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Array reply](../../develop/reference/protocol-spec#arrays): a list of consumers and their attributes.\n\n**RESP3:**\n\n[Array reply](../../develop/reference/protocol-spec#arrays): a list of consumers and their attributes."
    }
  ],
  "examples": [
    {
      "id": "examples-ex0",
      "language": "plaintext",
      "code": "> XINFO CONSUMERS mystream mygroup\n1) 1) name\n   2) \"Alice\"\n   3) pending\n   4) (integer) 1\n   5) idle\n   6) (integer) 9104628\n   7) inactive\n   8) (integer) 18104698\n2) 1) name\n   2) \"Bob\"\n   3) pending\n   4) (integer) 1\n   5) idle\n   6) (integer) 83841983\n   7) inactive\n   8) (integer) 993841998",
      "section_id": "examples"
    }
  ]
}
