Performance & limits
Payload size
Payload size is the encoded byte length of an event's data. It differs from the number of characters displayed or the size of an in-memory object.
Also found under: Message size, UTF-8 bytes, KiB
How it works
JSON punctuation, field names and string values all contribute bytes. Non-ASCII characters may require multiple UTF-8 bytes, and binary data encoded as text can grow substantially. Measure the serialized representation before sending data close to an API limit.
In a Pubb integration
Pubb limits event data to 10 KiB of UTF-8 JSON. A larger item should be stored in your backend or object storage, with an authorized reference or small change notification sent through the channel.
Publish an eventA practical example
A JavaScript publisher can inspect new TextEncoder().encode(JSON.stringify(data)).length. Ten KiB means 10,240 bytes, not a universal allowance of 10,240 characters.