W3cubDocs

/Phoenix

Phoenix.PubSub.PG2

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]

Options

  • :name - The registered name and optional node name to for the PubSub processes, for example: MyApp.PubSub, {MyApp.PubSub, :node@host}. When only a server name is provided, the node name defaults to node().

  • :pool_size - Both the size of the local pubsub server pool and subscriber shard size. Defaults the number of schedulers (cores). A single pool is often enough for most use-cases, but for high subscriber counts on a single topic or greater than 1M clients, a pool size equal to the number of schedulers (cores) is a well rounded size.

Summary

Functions

start_link(name, opts)

Functions

start_link(name, opts)

© 2014 Chris McCord
Licensed under the MIT License.
https://hexdocs.pm/phoenix_pubsub/Phoenix.PubSub.PG2.html