{
  "schema_version": 2,
  "id": "commands/xsetid",
  "title": "XSETID",
  "url": "https://redis.io/docs/latest/commands/xsetid/",
  "summary": "An internal command for replicating stream values.",
  "since": "5.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-06-29T16:21:31+03:00",
  "page_type": "content",
  "content_hash": "a57144f81fa0326585fe964c280d2c429489c8bc35b74e189935f0e256e9db1a",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "`XSETID` is an internal command. Users should not call it directly.\n \nRedis primary shards use it to replicate the last delivered entry ID of the stream."
    },
    {
      "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>last-id</code></summary>\n\nThe ID to set as the stream's last-generated ID.\n\n</details>"
    },
    {
      "id": "optional-arguments",
      "title": "Optional arguments",
      "role": "parameters",
      "text": "<details open><summary><code>ENTRIESADDED entries-added</code></summary>\n\nSet the stream's entries-added counter.\n\n</details>\n\n<details open><summary><code>MAXDELETEDID max-deleted-id</code></summary>\n\nSet the stream's maximum deleted entry ID.\n\n</details>"
    },
    {
      "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[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.\n\n**RESP3:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`."
    }
  ],
  "examples": []
}
