Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for subscription streams #35

Merged
merged 6 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/server/channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,10 @@ Centrifugo uses Go language [regexp](https://pkg.go.dev/regexp) package for regu

`proxy_sub_refresh` (boolean, default `false`) – turns on sub refresh proxy, more info in [proxy chapter](proxy.md)

### proxy_subscribe_stream

`proxy_subscribe_stream` (boolean, default `false`) - turns on subscribe stream proxy, see [subscription streams](./proxy_streams.md)

### subscribe_proxy_name

`subscribe_proxy_name` (string, default `""`) – turns on subscribe proxy when [granular proxy mode](proxy.md#granular-proxy-mode) is used. Note that `proxy_subscribe` option defined above is ignored in granular proxy mode.
Expand All @@ -442,6 +446,10 @@ Centrifugo uses Go language [regexp](https://pkg.go.dev/regexp) package for regu

`sub_refresh_proxy_name` (string, default `""`) – turns on sub refresh proxy when [granular proxy mode](proxy.md#granular-proxy-mode) is used. Note that `proxy_sub_refresh` option defined above is ignored in granular proxy mode.

### subscribe_stream_proxy_name

`subscribe_stream_proxy_name` (string, default `""`) – turns on subscribe stream proxy when [granular proxy mode](proxy_streams.md#granular-proxy-mode) is used. Note that `proxy_subscribe_stream` option defined above is ignored in granular proxy mode.

## Channel config examples

Let's look at how to set some of these options in a config. In this example we turning on presence, history features, forcing publication recovery. Also allowing all client connections (including anonymous users) to subscribe to channels and call publish, history, presence APIs if subscribed.
Expand Down
1 change: 1 addition & 0 deletions docs/server/proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The list of events that can be proxied:
* `sub_refresh` - called when a client subscription is going to expire, so it's possible to prolong it or just let it expire. Can also be used just as a periodical subscription liveness callback from Centrifugo to app backend. Works for bidirectional and unidirectional transports.
* `publish` - called when a client tries to publish into a channel, so it's possible to check permissions and optionally modify publication data. Works for bidirectional transports only.
* `rpc` - called when a client sends RPC, you can do whatever logic you need based on a client-provided RPC method and data. Works for bidirectional transports only.
* and starting from Centrifugo v5.1.0 we have experimental [proxy subscription streams](./proxy_streams.md) which are a bit special, so we describe them in a special doc chapter.

At the moment Centrifugo can proxy these events over two protocols:

Expand Down
Loading