Understanding the PubSub Engine
- Last UpdatedApr 24, 2025
- 2 minute read
At the center of the PubSub system is the PubSub Engine, running on each computer where the AVEVA Enterprise SCADA Common service is installed. The PubSub Engine acts as a message broker between publishers and subscribers.
When a subscription is received, the PubSub Engine records it internally, noting whether it is from a directly connected subscriber or from a peer engine. If the engine has already cached data for a publication matching the subscription, it may send an update to the subscriber immediately.
If the subscribed topic is under a topic space registered to a local persistence store, the engine sends the subscription to the persistence store to be fulfilled. If the subscribed topic is neither locally published nor handled by a persistence store, the engine broadcasts the subscription to the peer engines to verify if they can handle it.
When a publication is received by the PubSub Engine, the update is delivered to all directly connected subscribers. If the publication is from a local publisher and there are any subscribed peer engines, the publication is also broadcast to the peers. If no subscribers are found of either kind, the update is discarded.
When a subscriber unsubscribes from a topic, the PubSub Engine updates its internal subscription list. If the topic is under a persistence store topic space, the PubSub Engine forwards the unsubscribe request to the persistence store. If there are no more subscribers for the subscription, the previously published data is removed from the cache.
When a subscriber disconnects from the PubSub Engine, the engine unsubscribes from all subscriptions on the subscriber’s behalf. If a publisher disconnects from the PubSub Engine, the engine sends "no more publisher" messages for all subscriptions to topics published by the publisher.