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.
Summary
Functions
Returns a specification to start this module under a supervisor.
Gets all consumer process PIDs managed by this consumer group.
Starts a consumer group supervisor.
Stops a consumer group supervisor and all its child consumer processes.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Gets all consumer process PIDs managed by this consumer group.
Returns a list of consumer PIDs.
Starts a consumer group supervisor.
Parameters
name- Unique name for this consumer grouptopic- The topic to subscribe tosubscription_name- Name of the subscriptionsubscription_type- Type of subscription (e.g., :Exclusive, :Shared, :Key_Shared)callback_module- Module that implementsPulsar.Consumer.Callbackbehaviouropts- 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
Stops a consumer group supervisor and all its child consumer processes.