PhoenixPubsubRedisZ v0.1.0 Phoenix.PubSub.RedisZ View Source
Yet another Redis PubSub adapter for Phoenix. Supports sharding across multiple redis nodes.
Add :phoenix_pubsub_redis_z
to your deps:
defp deps do
[
{:phoenix_pubsub_redis_z, "~> 0.1.0"}
]
end
Then add it to your Endpoint’s config:
config :my_app, MyApp.Endpoint,
pubsub: [
name: MyApp.PubSub,
adapter: Phoenix.PubSub.RedisZ,
redis_urls: ["redis://redis01:6379/0", "redis://redis02:6379/0"]
]
Options
:name
- The required name to register the PubSub processes, ie:MyApp.PubSub
:redis_urls
- The required redis-server URL list:node_name
- The name of the node. Defaultsnode()
:pool_size
- The pool size of local pubsub server. Defaults 1:publisher_pool_size
- The pool size of redis publish connections for each redis-server. Defaults 8:publisher_max_overflow
: Maximum number of publish connections created if pool is empty.
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
.