# `Pulsar.ConsumerGroup`
[🔗](https://github.com/efcasado/pulsar-elixir/blob/main/lib/pulsar/consumer_group.ex#L1)

A supervisor that manages a group of consumer processes for a single topic.

This module provides a reusable abstraction for creating and managing
consumer groups, whether for regular topics or individual partitions
within a partitioned topic.

Each consumer group manages multiple consumer processes (configurable via
`consumer_count`) that all subscribe to the same topic with the same
subscription configuration.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `get_consumers`

Gets all consumer process PIDs managed by this consumer group.

Returns a list of consumer PIDs.

# `start_link`

Starts a consumer group supervisor.

## Parameters

- `name` - Unique name for this consumer group
- `topic` - The topic to subscribe to
- `subscription_name` - Name of the subscription
- `subscription_type` - Type of subscription (e.g., :Exclusive, :Shared, :Key_Shared)
- `callback_module` - Module that implements `Pulsar.Consumer.Callback` behaviour
- `opts` - Additional options:
  - `:consumer_count` - Number of consumer processes in this group (default: 1)
  - Other options passed to individual consumer processes

## Returns

`{:ok, pid}` - The consumer group supervisor PID
`{:error, reason}` - Error if the supervisor failed to start

# `stop`

Stops a consumer group supervisor and all its child consumer processes.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
