Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Sync Message Streams – Overview

Sync Message Streams let you broadcast JSON messages at a high rate to an elastic group of subscribers. Like WebRTC Data Channels, Message streams offer relaxed delivery guarantees by readily dropping messages that cannot be delivered promptly. The result is a low-latency, near-zero lag publish/subscribe tool for your realtime apps, a good complement to Sync’s high-fidelity state synchronisation primitives.

Messages may be published by many actors at a high rate, but they are only delivered to online clients and they may be received out of order.

Unlike Documents, Lists, or Maps, Messages in a Stream are ephemeral, avoiding the latency hit of persistent storage and connection recovery support. This makes it ideal for applications that are latency-sensitive and/or forgiving to missed messages:

  • Synchronized Video Overlays
  • Activity Heat Maps
  • Low-Value Human-to-Human Broadcasts
  • Gossip Protocols

Using Message Streams

With ACLs disabled, any SDK client can create and publish to a message stream. Note that, if you later enable ACLs on your Sync instance, only the REST API allows Message Stream creation. The ability to publish messages or subscribe to a stream is governed by the write and read permissions, respectively.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.