The occupancy feature enables you to view the number of occupants connected to a channel and specific metrics about their connections.

The metrics returned by the occupancy feature include the number of clients connected to a channel, the number of those authorized to subscribe to messages on the channel and the number of those clients authorized to publish to the channel. The occupancy metrics also include the number of connections authorized to subscribe to presence events, the number authorized to publish presence events and the number of connections currently entered into presence on the channel.

Channel occupancy can be queried in a number of ways. Occupancy can be viewed as part of channel enumeration, configured as an integration rule source or as inband channel occupancy events.

Occupancy and presence

Occupancy differs from presence in that presence enables a client to identify themselves to other clients subscribed to presence events on a channel, as well as to update their member data for subscribers to view. Presence events are emitted when a client enters or leaves a channel or when they update their member data. Occupancy provides a count of the clients connected to a channel, broken down into specific metric categories. Occupancy data can be viewed at a specific point in time when using channel enumeration, or emitted as events when metrics change using an integration rule source or inband channel occupancy.

API reference

Need help?

If you need any help with your implementation or if you have encountered any problems, do get in touch. You can also quickly find answers from our knowledge base, and blog.