package pubsub
- Alphabetic
- Public
- Protected
Value Members
- object PubSub extends [PubSub]
Registry for Topics.
- object Topic
A pub sub topic is an actor that handles subscribing to a topic and publishing messages to all subscribed actors.
A pub sub topic is an actor that handles subscribing to a topic and publishing messages to all subscribed actors.
It is mostly useful in a clustered setting, where it is intended to be started once on every node that want to house subscribers or publish messages to the topic, but it also works in a local setting without cluster.
In a clustered context messages are deduplicated so that there is at most one message sent to each node for each publish and if there are no subscribers on a node, no message is sent to it. Note that the list of subscribers is eventually consistent and there are no delivery guarantees built in.
Each topic results in a in the akka.actor.typed.receptionist.Receptionist so the same scaling recommendation holds for topics, see docs: https://doc.akka.io/libraries/akka-core/current/typed/actor-discovery.html#receptionist-scalability
Registry for Topics. Keeps one topic actor instance of each requested topic name so that they can be shared between all subscribers in the same actor system.
Note that manually spawned Topic actors will not appear in the registry.