# `Phoenix.Socket.Broadcast`
[🔗](https://github.com/phoenixframework/phoenix/blob/v1.8.12/lib/phoenix/socket/message.ex#L71)

Defines a message sent from pubsub to channels and vice-versa.

The message format requires the following keys:

  * `:topic` - The string topic or topic:subtopic pair namespace, for example "messages", "messages:123"
  * `:event`- The string event name, for example "phx_join"
  * `:payload` - The message payload

# `t`

```elixir
@type t() :: %Phoenix.Socket.Broadcast{event: term(), payload: term(), topic: term()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
