phoenix_pubsub v1.1.0 Phoenix.PubSub.PG2 View Source
Phoenix PubSub adapter based on PG2.
To use it as your PubSub adapter, simply add it to your Endpoint’s config:
config :my_app, MyApp.Endpoint,
pubsub: [name: MyApp.PubSub,
adapter: Phoenix.PubSub.PG2]
To use this adapter outside of Phoenix, you must start an instance of this module as part of your supervision tree:
children = [
{Phoenix.PubSub.PG2, name: MyApp.PubSub},
...
]
Options
:name
- The required registered name and optional node name for pubsub processes, for example:MyApp.PubSub
,{MyApp.PubSub, :node@host}
. When only a server name is provided, the node name defaults tonode()
.:pool_size
- Both the size of the local pubsub pool and subscriber shard size. Defaults to the number of schedulers (cores). A single pool is often enough for most use-cases, but for high subscriber counts on single topics or greater than 1M clients, a pool size equal to the number of schedulers (cores) is a well rounded size.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.