{
  "schema_version": 2,
  "id": "commands/xidmprecord",
  "title": "XIDMPRECORD",
  "url": "https://redis.io/docs/latest/commands/xidmprecord/",
  "summary": "An internal command for setting IDMP metadata on an existing stream message.",
  "since": "8.8.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": "daf12d1539d9ba8ee8fb9b85df6dde8f4ac32174541ace1f157439dd2d003d31",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "`XIDMPRECORD` is an internal command. Users should not call it directly.\n \nRedis uses it to set IDMP metadata, which is then replayed during AOF loading."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary>\n\nis the name of a stream key.\n\n</details>\n\n<details open><summary><code>pid</code></summary>\n\nis a producer ID.\n\n</details>\n\n<details open><summary><code>iid</code></summary>\n\nis an IDMP (idempotency) ID.\n\n</details>\n\n<details open><summary><code>stream-id</code></summary>\n\nis the ID of an existing stream message.\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=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> | <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nOne of the following:\n\n- A [simple string reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-strings) - `OK` when the provided pid/iid pair already maps to the same stream ID (that is, the command is idempotent).\n- A [simple error reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-errors) in one of the following cases:\n    - the key does not exist\n    - the key does not refer to a stream\n    - the stream ID refers to an non-existent or deleted entry\n    - pid and/or iid are empty\n    - the pid/iid pair already maps to a different stream ID\n\n**RESP3:**\n\nOne of the following:\n\n- A [simple string reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-strings) - `OK` when the provided pid/iid pair already maps to the same stream ID (that is, the command is idempotent).\n- A [simple error reply](https://redis.io/docs/latest/develop/reference/protocol-spec#simple-errors) in one of the following cases:\n    - the key does not exist\n    - the key does not refer to a stream\n    - the stream ID refers to an non-existent or deleted entry\n    - pid and/or iid are empty\n    - the pid/iid pair already maps to a different stream ID"
    }
  ],
  "examples": []
}
