A PubSubRef
represents a publish/subscribe topic.
Publish and subscribe to a topic is performed with a PubSubRef and that is retrieved via this registry.
Identifier of a topic.
Identifier of a topic. The messages of this topic will be instances of the
messageClass
or subclasses thereof. The qualifier
can be used to
distinguish topics that are using the same messageClass
. In other words
the identifier of the topic is the combination of the messageClass
and
the qualifier
.
the type of the messages that can be published to this topic
A
PubSubRef
represents a publish/subscribe topic.Messages can be published to the topic via a stream by using the
Source
returned by the #publisher method. A single message can be published with the #publish method.Messages can be consumed from the topic via a stream by using the
Sink
returned by the #subscriber method.The registry of subscribers is eventually consistent, i.e. new subscribers are not immediately visible at other nodes, but typically the information will be fully replicated to all other nodes after a few seconds.
New subscribers will not see old messages that were published to the topic, i.e. it is only a live stream of messages.
Messages are not guaranteed to be delivered, i.e. they may be lost. That can for example happen if there is a transient network partition.
The subscriber has a buffer of received messages, but messages will be dropped if that buffer is full and demand for more elements have not been requested from downstream. This can happen if a subscriber is slower than the publishers of the messages. When the buffer is full the oldest messages are dropped to make room for new messages.