# bext-realtime

**WebSocket and SSE pub/sub for bext — with optional Redis relay for horizontal scaling.**

Part of the [bext](https://github.com/bext-stack/bext) stack.

```toml
[dependencies]
bext-realtime = "0.2"
```

## What this crate is

`bext-realtime` is bext's real-time layer. It provides a pub/sub hub for
WebSocket and Server-Sent Events connections, with topic-based routing,
wildcard subscriptions, per-topic auth rules, and an optional Redis relay
for horizontal scaling across multiple bext instances.

## Features

- **WebSocket hub** — topic pub/sub, wildcard subscriptions (`chat.*`).
- **SSE streaming** — for clients that don't do WebSockets.
- **Auth rules** — per-topic allow/deny policies.
- **Upstream proxy mode** — optionally proxy WS connections to a backend.
- **Redis relay** (feature-gated) — broadcast messages across multiple bext
  instances for horizontal scaling.

```toml
[dependencies]
bext-realtime = { version = "0.2", features = ["redis"] }
```

## License

MIT.

## See also

- [github.com/bext-stack/bext](https://github.com/bext-stack/bext) — the bext meta repo
- [Full ecosystem](https://github.com/bext-stack/bext#ecosystem-at-a-glance) — all bext crates at a glance
