Socket.IO confirmed delivery

Viewed 6314

Before I dive into the code, can someone tell me if there is any documentation available for confirmed delivery in Socket.IO?

Here's what I've been able to glean so far:

  1. A callback can be provided to be invoked when and if a message is acknowledged
  2. There is a special mode "volatile" that does not guarantee delivery
  3. There is a default mode that is not "volatile"

This leaves me with some questions:

  1. If a message is not volatile, how is it handled? Will it be buffered indefinitely?
  2. Is there any way to be notified if a message can't be delivered within a reasonable amount of time?
  3. Is there any way to unbuffer a message if I want to give up?

I'm at a bit of a loss as to how Socket.IO can be used in a time sensitive application without falling back to volatile mode and using an external ACK layer that can provide failure events and some level of configurability. Or am I missing something?

2 Answers

I ensured delivery using different strategies

  1. I send data using socket including nonce in the message to prevent repeated message errors
  2. The other party sends a confirmation of recived meassage or i resend after x seconds
  3. I used a REST call by the client every 30 seconds to request all new messages sent by server to catch any dropped messages during transport
Related