# `EventStoreLite.PubSub`
[🔗](https://github.com/alexkuang/eventstore-lite/blob/v0.1.0/lib/event_store_lite/pubsub.ex#L1)

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

# `broadcast`

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

Broadcasts message on given topic.

# `child_spec`

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

Return the child spec.

# `subscribe`

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

Subscribes the caller to the given topic.

---

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