Managing topics
A client can add and remove topics at Diffusion™ Cloud .
Required permissions:
Adding topics is an asynchronous operation and calls back to notify of either successful creation of the topic or failure to create the topic.
If the topic add fails at
Diffusion
Cloud
, the reason for failure
is returned. Possible reasons for failure include the following:
- The topic already exists at Diffusion Cloud
- The name of the supplied topic is not valid
- The supplied details are not valid. This can occur only if properties are supplied.
- Permission to create the topic was denied
- An error occurred trying to initialize the newly created topic with the supplied content, possibly because it was not validly formatted
Note: You may wish to “add or update” a topic: add if it does not exist, but update if it does.
Methods are available which allow this..
A client can create topics subordinate to topics created by another client.
If persistence is not enabled, topics created using a client have a lifespan the same as the Diffusion server but can be explicitly removed at any time. The lifespan of topics can be further controlled using Automatic topic removal.