Search⌘ K
AI Features

PubSub

Explore how PubSub supports message broadcasting in Phoenix Channels to enable real-time web applications. Understand topic naming for scalability and performance, and learn how PubSub manages communication across nodes in a cluster. This lesson helps you grasp the foundation of delivering real-time updates efficiently in distributed Elixir applications.

Selecting a topic name

A carefully selected topic name is vital for the scalability and behavior of an application. For instance, a public Channel providing inventory updates to an e-commerce storefront could be implemented in a variety of ways:

  • inventory: This topic does not delineate between different SKUsStock Keeping Units.
  • inventory:*:
...