Table of Contents
Just a second...

Subscribing to topics

Consider the following information when deciding how clients subscribe to topics.

Registering streams

When you subscribe to topics the updates to that topics are received through streams. Register a stream against a set of topics in the topic tree that contains the topic or topics you subscribe to. This ensures that the client receives updates for a subscribed topic.

For more information, see Streams.

Subscribing to multiple topics

A client can subscribe to multiple topics in a single subscribe request. This subscription can be to topics that match a particular regular expression or to topics in a particular branch of the topic tree.

Use topic selectors to define a set of topics.

For more information, see Topic selectors in the Unified API and Topic selectors in the Classic API (deprecated)

Subscribing to topics that do not exist

A client can subscribe to a topic that does not exist. This is pre-emptive subscription. Diffusion™ keeps track of all subscribe and unsubscribe requests from a client, including for topics that do not exist. When a new topic is created, if a client has subscribed to that topic path, the client is subscribed to the new topic and receives updates from it.

Forced subscription

A publisher or a client with the required permissions can force other clients to become subscribed to a topic or set of topics, even if the subscribing client did not request the subscription.

Security

To subscribe to a topic, a client must have the read_topic permission for that topic.

For more information, see Permissions.