# XGROUP DELCONSUMER

```json metadata
{
  "schema_version": 2,
  "title": "XGROUP DELCONSUMER",
  "description": "Deletes a consumer from a consumer group.",
  "categories": ["docs","develop","stack","oss","rs","rc","oss","kubernetes","clients"],
  "arguments": [{"display_text":"key","key_spec_index":0,"name":"key","type":"key"},{"display_text":"group","name":"group","type":"string"},{"display_text":"consumer","name":"consumer","type":"string"}],
  "syntax_fmt": "XGROUP DELCONSUMER key group consumer",
  "complexity": "O(1)",
  "group": "stream",
  "command_flags": ["write"],
  "acl_categories": ["@write","@stream","@slow"],
  "since": "5.0.0",
  "arity": 5,
  "key_specs": [{"RW":true,"begin_search":{"spec":{"index":2},"type":"index"},"delete":true,"find_keys":{"spec":{"keystep":1,"lastkey":0,"limit":0},"type":"range"}}],
  "tableOfContents": {"sections":[{"id":"required-arguments","title":"Required arguments"},{"id":"redis-software-and-redis-cloud-compatibility","title":"Redis Software and Redis Cloud compatibility"},{"id":"return-information","title":"Return information"}]}

,
  "codeExamples": []
}
```

The `XGROUP DELCONSUMER` command deletes a consumer from the consumer group.

Sometimes it may be useful to remove old consumers since they are no longer used.

Note, however, that any pending messages that the consumer had will become unclaimable after it was deleted.
It is strongly recommended, therefore, that any pending messages are claimed or acknowledged prior to deleting the consumer from the group.

## Required arguments

<details open><summary><code>key</code></summary>

The stream key.

</details>

<details open><summary><code>group</code></summary>

The consumer group name.

</details>

<details open><summary><code>consumer</code></summary>

The name of the consumer to delete.

</details>

## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
|:----------------------|:-----------------|:------|
| <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> |  |

## Return information

**RESP2:**

[Integer reply](../../develop/reference/protocol-spec#integers): the number of pending messages the consumer had before it was deleted.

**RESP3:**

[Integer reply](../../develop/reference/protocol-spec#integers): the number of pending messages the consumer had before it was deleted.



