package pubsub
- Alphabetic
- Public
- All
Type Members
- trait PubSubComponents extends AnyRef
-
final
class
PubSubRef[T] extends NoSerializationVerificationNeeded
A
PubSubRefrepresents a publish/subscribe topic.A
PubSubRefrepresents a publish/subscribe topic.Messages can be published to the topic via a stream by using the
Sourcereturned 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
Sinkreturned 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.
-
trait
PubSubRegistry extends AnyRef
Publish and subscribe to a topic is performed with a PubSubRef and that is retrieved via this registry.
-
sealed
trait
TopicId[T] extends AnyRef
Identifier of a topic.
Identifier of a topic. The messages of this topic will be instances of the
messageClassor subclasses thereof. Thequalifiercan be used to distinguish topics that are using the samemessageClass. In other words the identifier of the topic is the combination of themessageClassand thequalifier.- T
the type of the messages that can be published to this topic