Just a second...

Managing topics

A client can add and remove topics at the Diffusion™ server.

Required permissions: modify_topic

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 the Diffusion server, the reason for failure is returned. Possible reasons for failure include the following:
  • The topic already exists at the Diffusion server
  • 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: Sometimes you may wish to "add or update" a topic: add it if it does not exist, but update if it does. There is no single method for this. Instead, the updating client can try to add the topic first, and if it receives a response that the topic exists, can then update it.

A client can create topics subordinate to topics created by another client.

Note:

It is not currently possible to add new topics under branches of the topic tree that have been created by internal publishers..

Currently all topics created using a client have a lifespan the same as the Diffusion server (unless persistence is enabled). The topics remain at the Diffusion server even after the client session that created them has closed unless you explicitly specify that the topic is removed with the session.