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

The metrics returned by the occupancy feature include the number of:

  • clients attached to a channel.
  • clients authorized to subscribe to messages on a channel.
  • clients authorized to publish to a channel.
  • presence members currently present on a channel.
  • connections authorized to subscribe to presence events.
  • connections authorized to publish presence events.

Query the channel status API to return the occupancy metrics of a channel. Alternatively, configure a channel.occupancy rule source or subscribe to inband channel occupancy events for a channel.

The occupancy and presence features differ in the following ways:

provides metrics about the clients attached to a channel. This includes a count of the number of clients attached, the number of publishers and subscribers, the number of presence members, and the number of presence publishers and subscribers.
provides information about the activity of members entered into the presence set of a channel. Presence members announce their state to presence subscribers via presence events. For example, when entering the presence set, leaving the presence set, or updating their member data.