Channel Metadata

Types

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

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.

NameDescriptionType
channelIdthe required name of the channel including any qualifier, if anystring
regionin events relating to the activity of a channel in a specific region, this optionally identifies the regionstring
isGlobalMasterin 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 channelboolean
statusan optional ChannelStatus instanceChannelStatus

The following is an example of a ChannelDetails JSON object:

JSON

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

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

ChannelDetails.ChannelStatus

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

NameDescriptionType
isActivea 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 activityboolean
occupancyan 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.Occupancy

ChannelDetails.ChannelStatus.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:

NameDescriptionType
connectionsthe number of connectionsinteger
publishersthe number of connections attached to the channel that are authorised to publishinteger
subscribersthe number of connections attached that are authorised to subscribe to messagesinteger
presenceSubscribersthe number of connections that are authorised to subscribe to presence messagesinteger
presenceConnectionsthe number of connections that are authorised to enter members into the presence channelinteger
presenceMembersthe number of members currently entered into the presence channelinteger
objectPublishersthe number of connections that are authorised to publish updates to objects on the channelinteger
objectSubscribersthe number of connections that are authorised to subscribe to objects on the channelinteger
Select...