ExESDB.Commanded.AggregateListenerSupervisor (ex_esdb_commanded v0.1.0)
DynamicSupervisor for managing AggregateListener processes.
This supervisor is responsible for:
- Starting and stopping AggregateListener processes
- Ensuring proper supervision and restart strategies
- Maintaining a registry of active listeners
- Cleanup on application shutdown
Summary
Functions
Returns a specification to start this module under a supervisor.
Lists all active listeners with their details.
Starts a new AggregateListener under supervision.
Returns statistics about active listeners.
Stops a specific AggregateListener.
Stops all listeners for a specific store and stream combination.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec list_listeners() :: [ %{ store_id: atom(), stream_id: String.t(), subscriber: pid(), listener_pid: pid() } ]
Lists all active listeners with their details.
Starts a new AggregateListener under supervision.
Returns the PID of the started listener or an error.
@spec stats() :: %{ total_listeners: non_neg_integer(), listeners_by_store: %{required(atom()) => non_neg_integer()}, active_streams: [String.t()] }
Returns statistics about active listeners.
@spec stop_listener(pid()) :: :ok
Stops a specific AggregateListener.
Stops all listeners for a specific store and stream combination.