Facade for the configured PubSub adapter.
Backed by CouncilEx.PubSub.PG (default, :pg-based) or
CouncilEx.PubSub.Phoenix (delegating to a user-supplied Phoenix.PubSub
server). Configure via:
config :council_ex, pubsub: :pg
# or:
config :council_ex,
pubsub: {CouncilEx.PubSub.Phoenix, name: MyApp.PubSub}The adapter is resolved once at application boot (inside the CouncilEx
start callback) and stashed in :persistent_term for fast dispatch.
Summary
Functions
Resolve the configured adapter and stash it in :persistent_term.
Called once at application start, and also re-callable from tests.
Broadcast message to every subscriber of topic.
Subscribe the calling process to topic.
Remove the calling process from topic.
Functions
@spec __resolve__!() :: :ok
Resolve the configured adapter and stash it in :persistent_term.
Called once at application start, and also re-callable from tests.
Broadcast message to every subscriber of topic.
@spec subscribe(String.t()) :: :ok
Subscribe the calling process to topic.
@spec unsubscribe(String.t()) :: :ok
Remove the calling process from topic.