Just a second...

Listening for topic events

A client can use the TopicControl feature of the Unified API to listen for events that happen on topics in a specific topic branch.

Registering a topic event listener

Required permissions: register_handler

You can use the TopicControl feature to receive a notification whenever one of the following topic events occurs:
  • A topic that previously had zero subscribers gains one or more subscribers
  • A topic that previously had one or more subscribers goes to zero subscribers
Note: Subscriber numbers also include indirect subscriptions, for example: subscriptions via a slave topic or routing topic; subscriptions by another Diffusion™ server for fan-out replication; or replication of the topic using high-availability replication.

A client can register a topic event listener against any branch of the topic tree. When a topic event occurs on one of the topics in that branch of the topic tree the listening client receives a notification.

If multiple clients register listeners against the same branch of the topic tree, all receive notifications. However, if a client registers a listener at a more specific branch of the topic tree, the most specific listener or listeners receive a notification and any less specific listeners within that same branch do not receive a notification.

For example: Client One registers a topic event listener against A, Client Two registers a topic event listener against A, and Client Three registers a topic event listener against A/B/C. If a topic event occurs on A/B, both Client One and Client Two receive notifications. If a topic event occurs on A/B/C/D, only Client Three receives a notification.