registerPubSubService function
Registers the pubsub object within the current service scope.
The provided pubsub object will be available via the top-level
pubsubService getter.
Calling this function outside of a service scope will result in an error. Calling this function more than once inside the same service scope is not allowed.
Implementation
void registerPubSubService(PubSub pubsub) {
ss.register(_pubsubKey, pubsub);
}