Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Default chunk size is plan-dependent (commonly 32 KB per chunk). Upgrade your plan or contact support if you need higher per-chunk limits.


What gets chunked

API
Chunked automatically

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

  1. Check limits at connect β€” gate file uploads in UI when files exceed reasonable bounds

  2. Show upload progress locally β€” DNotifier does not expose per-chunk send progress; track read/upload in your app

  3. Prefer structured send() for media β€” chunking, history, and typed handlers work together

  4. Compress 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.


Last updated