Wake-up delivery for low-latency dispatch.
Notifiers are accelerators, never load-bearing: polling remains the correctness floor, so a lost or unavailable notifier costs latency, not jobs. Two ship built-in:
Belay.Notifier.Local(always on) — in-process registry pokes plus:pgbroadcast when BEAM nodes are clustered with distributed Erlang. Same-node dispatch is effectively instant; clustered dispatch is a message send away.Belay.Notifier.Postgres(opt-in) —pg_notifywake-ups through the database, for fleets that share Postgres but not an Erlang cluster:{Belay, name: MyApp.Belay, storage: [adapter: :postgres, url: url], notifiers: [:local, :postgres], ...}The listening side uses one dedicated connection per node (
Postgrex.Notifications, auto-reconnecting) — pointlisten_url:at a direct connection if your main URL goes through a transaction pooler. NOTIFY payloads here are tiny (a queue name or job id), and if the channel is down you fall back tobusy_poll/poll_intervalpickup.
Summary
Callbacks
Deliver a wake-up through this notifier.
Optional listener process for the receiving side.
Types
Callbacks
@callback broadcast(Belay.Config.t(), message()) :: :ok
Deliver a wake-up through this notifier.
@callback child_spec({Belay.Config.t(), keyword()}) :: Supervisor.child_spec()
Optional listener process for the receiving side.