{
  "id": "redis-di-list-dlq-records",
  "title": "redis-di list-dlq-records",
  "url": "https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-list-dlq-records/",
  "summary": "Lists the rejected records of a dead-letter queue",
  "tags": [
    "redis-di"
  ],
  "last_updated": "2026-07-13T12:40:14-05:00",
  "page_type": "content",
  "content_hash": "318fd6f3b2fc4c250af35041220e6227becfbdd720028a3e746a563bcf159a20",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Lists the rejected records of a single dead-letter queue (DLQ), taking the queue name as an argument\nand paging with `--limit`, `--offset`, and `--sort-order`. The operation code is shown by name\n(create, update, delete, read). `get-rejected` is an alias for this command.\n\nUse [`list-dlqs`](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-list-dlqs)\nto see all the pipeline's dead-letter queues and their record counts."
    },
    {
      "id": "usage",
      "title": "Usage",
      "role": "syntax",
      "text": "[code example]"
    },
    {
      "id": "options",
      "title": "Options",
      "role": "parameters",
      "text": "| Option | Description |\n| :-- | :-- |\n| `-p`, `--pipeline` | Pipeline to target (default `default`). |\n| `--limit` | Maximum number of records to return (default `20`). |\n| `--offset` | Number of records to skip (default `0`). |\n| `--sort-order` | Sort order: `asc` (oldest first) or `desc` (newest first, default). |\n| `-o`, `--output` | Output format: `table` (default), `json`, or `yaml`. |\n\nThe following options are kept for backward compatibility with the `get-rejected` command and are\ndeprecated:\n\n| Deprecated option | Use instead |\n| :-- | :-- |\n| `--dlq-name` | Pass the DLQ name as an argument. |\n| `--max-records` | `--limit` |\n| `--oldest` | `--sort-order asc` |\n\nThis command also accepts the\n[global options](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di#global-options)."
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "[code example]"
    }
  ],
  "examples": [
    {
      "id": "usage-ex0",
      "language": "plaintext",
      "code": "redis-di list-dlq-records <dlq-name> [flags]",
      "section_id": "usage"
    },
    {
      "id": "example-ex0",
      "language": "bash",
      "code": "# Newest 20 rejected records of a queue\nredis-di list-dlq-records inventory.customers\n\n# Oldest 100 records, as JSON\nredis-di list-dlq-records inventory.customers --limit 100 --sort-order asc -o json",
      "section_id": "example"
    }
  ]
}
