package pubsub
- Alphabetic
- Public
- Protected
Value Members
- 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 pekko.actor.typed.receptionist.ServiceKey in the pekko.actor.typed.receptionist.Receptionist so the same scaling recommendation holds for topics, see docs: https://pekko.apache.org/docs/pekko/current/typed/actor-discovery.html#receptionist-scalability