Large messages & chunking
DNotifier SDKs automatically split payloads larger than your plan's per-chunk limit and reassemble them on the receiver before onMessage fires. You send one logical message; recipients always see the complete payload.
How chunking works
send(large payload)
β
βΌ
SDK compares size to messageSizeLimit
β
βββ fits in one chunk β single frame
β
βββ too large β split into N chunks
β
βΌ
each chunk framed with metadata
(packet index, total count, message id)
β
βΌ
receiver SDK buffers chunks
β
βΌ
all N received β merge β onMessage(complete payload)You do not implement chunking logic unless you are building a custom transport client.
messageSizeLimit
After connect(), read the limit from the client:
This value is also available via getPlanLimits(). It defines the maximum size of each chunk, not necessarily the total message size β multi-chunk messages can exceed this limit in total.
What gets chunked
send() with large data.content (images, docs)
Yes
sendBinary() with large buffer
Yes
Small text messages
No β sent in a single frame
Receiver behavior
Your onMessage handler always receives a complete reassembled message:
If the connection drops mid-chunk, the partial buffer is discarded. The sender may retry after reconnect.
Best practices
Check limits at connect β gate file uploads in UI when files exceed reasonable bounds
Show upload progress locally β DNotifier does not expose per-chunk send progress; track read/upload in your app
Prefer structured
send()for media β chunking, history, and typed handlers work togetherCompress before send β reduce chunk count for very large payloads when your format allows
Plan relationship
Message volume and size limits count toward your plan quotas. See Plan limits & quotas and Pricing & plans.
Related topics
Last updated