Binary topics
A topic that streams binary data as bytes and uses efficient binary deltas to stream only the data that changes between updates. Binary topics are stateful: their state is maintained on Diffusion™ Cloud.
Why use a binary topic?
You can use a binary topic to transmit any arbitrary binary data without the overhead of encoding it to a string or the risk of the binary data being incorrectly escaped.
Binary topics can use binary deltas to send only the data that has changed when this is more efficient than sending the full value.
You can use a binary topic to transmit very large strings. This enables a client to use the binary delta capability to transmit only the changed parts of a string rather than the whole value. This reduces the amount of data transmitted over the network.
Binary formats, such as Google protocol buffers, can be streamed using a binary topic.
Properties of a binary topic
- PUBLISH_VALUES_ONLY
- If set to true, all values are published in full. Otherwise, deltas
are published if they are more efficient to send than the full values.
If there is little or no relationship between values published to a topic, delta streams will not reduce the amount of data transmitted. For such topics, it is better to set PUBLISH_VALUES_ONLY.
Considerations when using a binary topic
Data on binary topics contains no implicit information about its structure.
Data on binary topics cannot be viewed in the console.
API clients (deprecated) do not support any interaction with binary topics.
- JavaScript API
- Java API
- Android API
- .NET API
- C API
- Apple®
API
Use this API to create binary topics and to receive data from binary topics. Updating binary topics is not yet fully supported.
If you use value streams to receive updates from a binary topic, this can cause problems in the event of client reconnection. We recommend that when using value streams, you configure your clients not to attempt to reconnect to a session, but instead to connect again with a new session and resubscribe to topics.
This page last modified: 2016/09/29