Channel Metadata

The payload of metadata events for channels is the ChannelDetails type which contains the channelId and other static information about the channel, plus a status containing a ChannelStatus instance which contains information about the current state of the channel.

ChannelDetails is an object returned when requesting or receiving channel metadata. It contains information on the channel itself, along with the current state of the channel in the ChannelStatus object.

channelId
the required name of the channel including any qualifier, if anyType: string
region
in events relating to the activity of a channel in a specific region, this optionally identifies the regionType: string
isGlobalMaster
in events relating to the activity of a channel in a specific region, this optionally identifies whether or not that region is responsible for global coordination of the channelType: boolean
status
an optional ChannelStatus instanceType: ChannelStatus

The following is an example of a ChannelDetails JSON object:

{ "channelId": "foo", "status": { "isActive": true, "occupancy": { "metrics": { "connections": 1, "publishers": 1, "subscribers": 1, "presenceConnections": 1, "presenceMembers": 0, "presenceSubscribers": 1 } } } }
Copied!

ChannelStatus is contained within the ChannelDetails object, and optionally contains an Occupancy object.

isActive
a required boolean value indicating whether the channel that is the subject of the event is active. For events indicating regional activity of a channel this indicates activity in that region, not global activityType: boolean
occupancy
an optional Occupancy instance indicating the occupancy of the channel. For events indicating regional activity of a channel this indicates activity in that region, not global activity.Type: Occupancy

Occupancy is optionally contained within the ChannelStatus object, and contains metadata relating to the occupants of the channel. This is usually contained within the occupancy attribute of the ChannelStatus object.

The occupancy attribute contains the metrics attribute, which contains the following members:

connections
the number of connectionsType: integer
publishers
the number of connections attached to the channel that are authorised to publishType: integer
subscribers
the number of connections attached that are authorised to subscribe to messagesType: integer
presenceSubscribers
the number of connections that are authorised to subscribe to presence messagesType: integer
presenceConnections
the number of connections that are authorised to enter members into the presence channelType: integer
presenceMembers
the number of members currently entered into the presence channelType: integer
Types
v2.0