Elixir MIT

phoenix_pubsub_redis

The Redis PubSub adapter for the Phoenix framework

P

phoenixframework

Dernière activité 14 avr. 2026
phoenixframework/phoenix_pubsub_redis

183

étoiles

67

forks

2

issues ouvertes

Ce README est souvent en anglais.

Phoenix.PubSub.Redis

A Redis PubSub adapter for the Phoenix framework

See the docs for more information.

Usage

To use Redis as your PubSub adapter, simply add it to your deps and application supervision tree:

# mix.exs
defp deps do
  [
    {:phoenix_pubsub_redis, "~> 3.0"}
  ]
end

# application.ex
children = [
  # ...,
  {Phoenix.PubSub,
   adapter: Phoenix.PubSub.Redis,
   redis_opts: "redis://localhost:6379",
   node_name: System.get_env("NODE")}

  # or with keyword options:
  {Phoenix.PubSub,
   adapter: Phoenix.PubSub.Redis,
   redis_opts: [host: "example.com", port: 6379],
   node_name: System.get_env("NODE")}

Config Options

Option Description Default
:name The required name to register the PubSub processes, e.g. MyApp.PubSub.
:node_name The name of the node. Must be unique. node()
:compression_level Compression level applied to serialized terms - 0 (none) to 9 (highest). 0
:redis_pool_size The size of the Redis connection pool. 5
:redis_opts Redix connection options - either a Redis URL string or a keyword list. See Redix docs for details.

Projets similaires

Distributed PubSub and Presence platform for the Phoenix Framework

Elixir
Pphoenixframework
772 étoiles135

Fast, pipelined, resilient Redis driver for Elixir. 🛍

Elixirelixirelixir-libraryredis
Wwhatyouhide
1,1 k étoiles127

A Ruby client library for Redis

Ruby
Rredis
4 k étoiles1 k