Channel namespaces provide a simple way to group channels together based on a prefix that is included in the channel name. The special colon character : is used to delimit a channel namespace.
For example, the following channels are all part of the "public" namespace:
Rules can be configured for a channel namespace ensuring those rules are applied to any channel created that contains the namespace prefix. Channel namespaces currently support the following rules:
- Persisted messages - If enabled, messages will be stored according to the storage rules for your account. You can access stored messages via the History API. Please note that for each message stored, an additional message is deducted from your monthly allocation.
- Require identification - if enabled, clients will not be permitted to subscribe to the channel unless they are both authenticated and identified (they have an assigned client ID). Anonymous clients are not permitted to join these channels. Find out more about authenticated and identified clients.
- Require TLS - if enabled, only clients who have connected to Ably over TLS will be allowed to join the channel.
- Push notifications enabled - when checked, a push notification payload may be included in the extras field of published messages which will in turn ensure a native push notification is published to all subscribed push notification devices for that channel. Find our more about push notifications.
Unfortunately, we do not currently support wildcards in namespace identifiers.
See channel rules configuration for more step-by-step instructions on how to configure channel namespace rules.