Search code examples
ruby-on-rails-5actioncable

Does actioncable support resuming from an offline client?


I have a javascript SPA application that needs to support a user being offline for brief periods of time. I'm considering using actioncable for broadcasting changes the client may not be aware of.

If a websocket connection is lost for a brief amount of time, and then reconnected: will the client receive messages which were broadcast while they were offline?


Solution

  • From the guide:

    Broadcastings are purely an online queue and time dependent. If a consumer is not streaming (subscribed to a given channel), they'll not get the broadcast should they connect later.

    So no, the client will not receive messages sent when they were offline.