A client can listen for events that happen on topics in a specific
Note: Topic event listeners are deprecated from Diffusion™ 6.1 onwards
in favor of automatic topic removal.
Registering a topic event listener
You can use the TopicControl
receive a notification whenever one of the following topic events occurs:
- A topic that previously had zero subscribers gains one or more
- A topic that previously had one or more subscribers goes to zero
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
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