chat:* family of channels where signed-in people can join and send, with the last 50 messages kept.
1. Create the channel rule in Studio
- Open your project, choose
development, then Services → Realtime. - In the sidebar choose Channels (under Configure).
- Click Add rule (the page is titled Channel rules).
- Pattern:
chat:*. - Kind: Presence (tracks who is on the channel as well as messages).
- Subscribe policy: Signed-in users. Publish policy: Signed-in users.
- Presence: on. History depth:
50. - Save. The rule appears in the list. New rules apply to new connections within about 30 seconds.
2. Try it in the Playground
- Choose Playground (under Tools).
- Enter
chat:lobbyas the channel and join it. - Send a message with the event
messageand a payload like{"text": "hello"}.
3. Do it from your app
Sign a person in (Auth), then:4. See it live in Studio
Go back to Overview: the channel shows under Active channels, your connection under Connections, and the counts of messages published and delivered climb.What you’ve learned
- Rules in Studio decide who can join and send.
- A pattern covers many channels (
chat:*). - The Playground lets you test without writing code.
Channel rules
Every rule setting.
Channels
Using them in your app.