# BUSYGROUP: Consumer group already exists

> XGROUP CREATE found a group with that name on the stream: group names are unique per stream and are not overwritten.

Source: https://sqlly.app/errors/redis/busygroup
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).
Note: Quoted error message text belongs to its database vendor.

- Error prefix: `BUSYGROUP`
- Category: Streams and pub/sub

Error message:

```text
BUSYGROUP Consumer Group name already exists
```

## What it means

Consumer groups are named per stream, and XGROUP CREATE mystream workers refuses when a group called workers is already there. Redis does not overwrite it silently, because the group's read pointer, the last-delivered-id, is state that consumers depend on; re-creating it would rewind or skip history for everyone attached.

The intended pattern for boot code is to treat this error as success: the goal is 'a group named workers exists', not 'this process created it'. There is no create-if-not-exists option, so initialization code catches BUSYGROUP and moves on.

## Common causes

- Startup code creates the group on every boot and does not treat 'already exists' as success.
- Two services race to create the same group on boot; one wins and the other receives BUSYGROUP.
- The code was renamed and then reverted, or a name was reused, while the old group still exists on the stream.

## How to fix it

1. List the groups on the stream; that list is the source of truth:

   ```sql
   XINFO GROUPS mystream
   ```
2. Treat BUSYGROUP as success in initialization code, since the desired state already holds.
3. If the group genuinely must be rebuilt, with consumers re-reading history, delete and recreate it while nothing is attached:

   ```sql
   XGROUP DESTROY mystream workers
   XGROUP CREATE mystream workers 0
   ```

## Reproduce it safely

```sql
redis-cli DEL mystream
redis-cli XGROUP CREATE mystream workers $ MKSTREAM
redis-cli XGROUP CREATE mystream workers $
# (error) BUSYGROUP Consumer Group name already exists
```

## How SQLly helps

SQLly prints the BUSYGROUP line as sent, and XINFO GROUPS runs from the editor, so initialization code can be checked against the stream's real group list instead of guessing whether the create was a duplicate.

## Questions

### Can two groups share a name on different streams?

Yes. Uniqueness is per stream: mystream/workers and events/workers coexist without any problem.

### How do I reset a group's position without recreating it?

XGROUP SETID mystream workers $ moves the read pointer to the stream's last entry ID, or to any id, while consumers keep their names and state.

## Related errors

- [`NOGROUP`](https://sqlly.app/errors/redis/nogroup): Consumer group does not exist
- [`42710`](https://sqlly.app/errors/postgresql/42710): PostgreSQL: duplicate object

The code and message text are from the [Redis documentation and source code](https://redis.io/docs/latest/).
