DynamicSupervisor that manages all registered consumer worker processes. Consumers are registered either:
- Statically via
PhoenixMicro.register_consumer/1at app start. - Dynamically at runtime via
PhoenixMicro.Supervisor.ConsumerManager.start_consumer/1.
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns a list of all running consumer modules.
Starts the processing pipeline for the given consumer module.
Stops a running consumer (works for both Broadway and Worker modes).
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec running_consumers() :: [module()]
Returns a list of all running consumer modules.
@spec start_consumer(module()) :: DynamicSupervisor.on_start_child()
Starts the processing pipeline for the given consumer module.
Chooses between PhoenixMicro.Pipeline (Broadway-backed, default) and
the legacy PhoenixMicro.Consumer.Worker (Task-based) depending on the
consumer's pipeline setting:
pipeline :broadway # default — full backpressure, batch support
pipeline :simple # legacy — Task.start dispatchIdempotent — if the consumer is already running, returns {:ok, pid}.
@spec start_link(keyword()) :: Supervisor.on_start()
@spec stop_consumer(module()) :: :ok | {:error, :not_found}
Stops a running consumer (works for both Broadway and Worker modes).