Messages are the actual packages of data that get published to your spaces. They can contain any serializable data, including objects, arrays, numbers, and strings. String content can include any UTF-8 character, single-byte and multi-byte. PubNub's maximum size for a single message is 32 KiB.
While messages can be in any format, JSON is usually the best choice. The data can be any serializable JSON object; the PubNub SDKs automatically stringify JSON objects before publishing. When you use JSON, the keys and values are up to you.
Note: The total number of messages per month is counted as the number of messages published + number of messages received via subscribe or history. For instance, if a message is published in a group chat with 5 users, the number of messages = 1 published message + 5 subscribed messages + messages fetched from storage. Other events like presence online/offline events, typing indicators, receipts, and reactions are not counted as messages.
In case of any questions, contact us at support@pubnub.com.