Event pub/sub that connects actors without coupling.
Two event layers:
- Layer A: Domain events (emitted by your application)
- Layer B: Runtime events (emitted by Cyclium internals)
Built on Phoenix.PubSub. The consuming app provides the PubSub process
via Cyclium.Supervisor opts.
Summary
Functions
Publish to both the global topic and the event-specific topic, so both broad and targeted subscribers receive the event.
Publish an event to the bus. All subscribers receive {:bus, event_type, payload}.
Broadcast a cancel request for an episode to whichever node runs it. Backs
Cyclium.Episodes.request_cancel/2.
Subscribe the calling process to all bus events.
Messages arrive as {:bus, event_type, payload}.
Subscribe to a specific event type topic.
Messages arrive as {:bus, event_type, payload}.
Subscribe the calling process to cancel requests for one episode.
Functions
Publish to both the global topic and the event-specific topic, so both broad and targeted subscribers receive the event.
Publish an event to the bus. All subscribers receive {:bus, event_type, payload}.
Broadcast a cancel request for an episode to whichever node runs it. Backs
Cyclium.Episodes.request_cancel/2.
Subscribe the calling process to all bus events.
Messages arrive as {:bus, event_type, payload}.
Subscribe to a specific event type topic.
Messages arrive as {:bus, event_type, payload}.
Subscribe the calling process to cancel requests for one episode.
A running EpisodeTask subscribes so a "stop" reaches it on whatever node
runs the episode (PubSub is cluster-wide), landing as {:cyclium_cancel, reason} handled at the next step boundary.