Receiving data from topics
A client can subscribe to a topic to receive a stream of updates or can fetch the current state of a topic.
Topics
A topic is a logical channel through which data can be distributed to clients. Topics provide a logical link between publishing clients and subscribing clients.
Diffusion™ Cloud provides different types of topic that can be used to stream diffent data formats or can be used for special purposes. For more information about topic types and uses, see Topics.
Subscribing
To receive data published to a topic as a stream of updates, a client takes the
following actions:
- Subscribe to a topic or set of topics.
- Register a stream that matches the topic or set of topics, or register a matching fallback stream.
Note: The subscription flow is fully described in the design section of the
documentation. For more information, see Subscribing to topics.
Fetching
To fetch the current value of a topic or set of topics, a client makes a fetch request, passing in a fetch stream, and uses the fetch stream to receive the data.
Streams
Clients use streams to receive data from topics.
Streams are API objects that can receive multiple calls from Diffusion Cloud on the same method while the stream is open. After
the stream is closed or discarded, it can no longer receive responses on any of its
other methods.
This page last modified: 2020/06/25