Every message received on a channel is counted as one message. For example, if a client publishes a message on a channel with 10 clients attached to the channel, then that will count as one message published, and 10 messages received

Note:

Client-side filtering of messages has no effect on message counting as all messages published on a channel are received by the client and the client-side filtering offered per channel is only a convenience provided for developers. See the realtime subscribing to messages documentation.

If echo messages is enabled (the default setting), then every message published on a channel using a realtime client is also echoed back to that client and will thus count as two messages (one published, one received). See the echoMessages attribute of the client options documentation if you wish to disable automatic message echoing.

Every presence event published is counted as one message i.e. if a client enters, updates, or leaves a channel, that counts as one message.

Every presence event received on the channel is counted as one message. For example, if a client enters a channel and there are 10 clients attached to the channel (including the client that entered), then that will count as one message published, and 10 messages received.

Note:

Similarly to normal messages, client-side filtering has no effect on presence message counting.

Unlike normal messages, the echoMessages client option has no effect on presence messages, which are always echoed so as to allow the entering client to know when they are themselves present and to rejoin the presence set when they need to.

If a client is attached to a channel for which it does not have `subscribe` capability (see https://www.ably.io/documentation/general/authentication#capabilities-explained ), then it will not receive (or be charged for receiving) any presence messages -- with the exception of its own presence messages, which it will always receive, per the previous bullet point. This can be useful if you have a client which only needs to be present, not receive presence messages.

At present, REST requests to retrieve channel metadata (such as channel status and occupancy, or channel enumeration) will not count towards your message limit. However, we may in future consider charging for these requests if the volumes of these requests is considerable. Get in touch if you want to discuss your requirements.

Every channel lifecycle event published over Reactorwill count as one message

Every message published to a Queue, WebHook, Function or Firehose will count as an additional message. For example, if you publish a message on a channel that is in turn republished to a Reactor Queue, that will count as two messages.

Every push notification delivered to a device counts as one message. The count is the same irrespective of whether the message is broadcast via our channel fan-out functionality or published directly using the publish API.

Bandwidth

The size of each message published is calculated based on the size of the name,dataandextras fields of your message or presence messages.

The amount of bandwidth allocated to your account is calculated using the total number of messages in a month multiplied by the allowed average message size (typically 2KiB unless agreed separately with your account manager). For example, on a free account with 3 million messages and an average message size of 2KiB, the total bandwidth included in the month is 6.14GB.

Every message published that is over 2KiB counts as more than one message. For example, a 16KiB message published is counted as 8 messages when published, and if received 10 times, is counted as 80 messages received.

You can view the total number of messages, bandwidth and connections in your account dashboard. A sample screenshot can be seen below: