Перейти к содержимому
Русский

PubSubDelivery

Это содержимое пока не доступно на вашем языке.

PubSubDelivery = "all-subscribers" | "one-subscriber"

Defined in: src/cluster/pubsub/Messages.ts:50

How a Publish picks recipients among a topic’s subscribers.

'one-subscriber' is anycast: exactly one subscriber cluster-wide gets the message. That is what a work queue wants — N workers on one topic, every task handled once — and it is the case a broadcast bus cannot serve without the workers coordinating among themselves.

A string union rather than a second message class because the two differ only in how many recipients are chosen, and because it leaves room for a further selection (Akka’s per-consumer-group anycast) without a third class and a third wire kind.