Message Queue

Each socket connection has an in-memory message queue (FIFO) that holds onto recently published messages for the cache duration (12-16 minutes) and is limited to the most recent 100 messages. Consequently, publishing over 100 messages in the window of the subscribe reconnect time inevitably results in older messages overflowing the queue and getting discarded. For long term, reliable persistence and retrieval of missed message, you should enable Storage & Playback add-on with a duration up to 30 days or even unlimited and use the history API to retrieve those messages.

For further learning, please see:

  • Message Queue section of the knowledge base

Try PubNub Today

Connect up to 100 devices for Free