# `EventStore.PubSub`
[🔗](https://github.com/commanded/eventstore/blob/v1.4.12/lib/event_store/pubsub.ex#L1)

Pub/sub using Elixir's local `Registry` module.

# `broadcast`

```elixir
@spec broadcast(EventStore.t(), binary(), term()) :: :ok
```

Broadcasts message on given topic.

# `child_spec`

```elixir
@spec child_spec(EventStore.t()) :: [:supervisor.child_spec()]
```

Return the child spec.

# `subscribe`

```elixir
@spec subscribe(EventStore.t(), binary(),
  selector: (EventStore.RecordedEvent.t() -&gt; any()),
  mapper: (EventStore.RecordedEvent.t() -&gt; any())
) :: :ok | {:error, term()}
```

Subscribes the caller to the given topic.

---

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