{"id":21657983,"url":"https://github.com/phoenixframework/phoenix_pubsub","last_synced_at":"2025-07-17T20:32:32.750Z","repository":{"id":2193229,"uuid":"45914865","full_name":"phoenixframework/phoenix_pubsub","owner":"phoenixframework","description":"Distributed PubSub and Presence platform for the Phoenix Framework","archived":false,"fork":false,"pushed_at":"2024-10-09T19:46:30.000Z","size":388,"stargazers_count":650,"open_issues_count":14,"forks_count":123,"subscribers_count":38,"default_branch":"main","last_synced_at":"2024-10-29T21:59:47.536Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.phoenixframework.org/","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phoenixframework.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-10T13:51:07.000Z","updated_at":"2024-10-27T10:29:24.000Z","dependencies_parsed_at":"2023-01-13T11:41:30.467Z","dependency_job_id":"ed44fd7c-54b1-420f-8e72-f13577fb8e38","html_url":"https://github.com/phoenixframework/phoenix_pubsub","commit_stats":{"total_commits":227,"total_committers":62,"mean_commits":3.661290322580645,"dds":"0.46696035242290745","last_synced_commit":"2dcf0a1044296fe71526712da5c91c1e20d2b471"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixframework%2Fphoenix_pubsub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixframework%2Fphoenix_pubsub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixframework%2Fphoenix_pubsub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoenixframework%2Fphoenix_pubsub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phoenixframework","download_url":"https://codeload.github.com/phoenixframework/phoenix_pubsub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226304234,"owners_count":17603541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T09:28:26.822Z","updated_at":"2024-11-25T09:28:30.130Z","avatar_url":"https://github.com/phoenixframework.png","language":"Elixir","funding_links":[],"categories":["Elixir"],"sub_categories":[],"readme":"# Phoenix.PubSub\n\n\u003e Distributed PubSub and Presence platform for the Phoenix Framework\n\n[![Build Status](https://github.com/phoenixframework/phoenix_pubsub/actions/workflows/ci.yml/badge.svg)](https://github.com/phoenixframework/phoenix_pubsub/actions/workflows/ci.yml)\n\n## Usage\n\nAdd `phoenix_pubsub` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:phoenix_pubsub, \"~\u003e 2.0\"}]\nend\n```\n\nThen start your PubSub instance:\n\n```elixir\ndefmodule MyApp do\n  use Application\n\n  def start(_type, _args) do\n    children = [\n      {Phoenix.PubSub, name: MyApp.PubSub}\n    ]\n\n    opts = [strategy: :one_for_one, name: MyApp.Supervisor]\n    Supervisor.start_link(children, opts)\n  end\nend\n```\n\nNow broadcast and subscribe:\n\n```elixir\nPhoenix.PubSub.subscribe(MyApp.PubSub, \"user:123\")\nPhoenix.PubSub.broadcast(MyApp.PubSub, \"user:123\", :hello_world)\n```\n\n## Testing\n\nTesting by default spawns nodes internally for distributed tests.\nTo run tests that do not require clustering, exclude  the `clustered` tag:\n\n```shell\n$ mix test --exclude clustered\n```\n\nIf you have issues running the clustered tests try running:\n\n```shell\n$ epmd -daemon\n```\n\nbefore running the tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoenixframework%2Fphoenix_pubsub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphoenixframework%2Fphoenix_pubsub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoenixframework%2Fphoenix_pubsub/lists"}