Phoenix.PubSub.Server

Handles PubSub subscriptions and garbage collection with node failover

All PubSub creates, joins, leaves, and destroys are funneled through master PubSub Server to prevent race conditions on global :pg2 groups.

All nodes monitor master Phoenix.PubSub.Server and compete for leader in the event of a nodedown.

Configuration

To set a custom garbage collection timer, add the following to your Mix config

config :phoenix, :pubsub,
  garbage_collect_after_ms: 60_000..120_000

Summary

leader_pid()
start_link(opts)

Functions

leader_pid()
start_link(opts)