A supervisor that manages individual consumer groups for partitioned topics.
This module provides a logical abstraction over multiple consumer groups,
allowing the start_consumer API to return a single PID for partitioned topics
while maintaining the individual consumer group architecture underneath.
The supervisor manages one consumer group per partition, with the number of partitions provided by the caller.
Summary
Functions
Returns a specification to start this module under a supervisor.
Gets all consumer processes from all partition groups managed by this supervisor.
Gets information about all child consumer groups managed by this supervisor.
Starts a partitioned consumer supervisor.
Stops a partitioned consumer supervisor and all its child consumer groups.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Gets all consumer processes from all partition groups managed by this supervisor.
Returns a flat list of consumer process PIDs from all partitions.
Gets information about all child consumer groups managed by this supervisor.
Returns a list of {partition_topic, group_pid} tuples.
Starts a partitioned consumer supervisor.
Parameters
name- Unique name for this partitioned consumertopic- The base partitioned topic name (without partition suffix)partitions- Number of partitions for this topicsubscription_name- Name of the subscriptionsubscription_type- Type of subscription (e.g., :Exclusive, :Shared, :Key_Shared)callback_module- Module that implementsPulsar.Consumer.Callbackbehaviouropts- Additional options passed to individual consumer groups
Returns
{:ok, pid} - The supervisor PID that manages all partition consumer groups
{:error, reason} - Error if the supervisor failed to start
Stops a partitioned consumer supervisor and all its child consumer groups.