# Message platform for fan-out

> Send each notification through a Queue and Workers to a managed provider, so a slow or failing send never holds a request.

Send a notification from a Worker to a managed provider, not from the App Server that took the request.

## Move up when

- Users expect push or email after an event, and each send holds an App Server slot.
- A provider's slow answer or outage shows up as slow pages.
- One event must reach many receivers, and the sends are growing.

## The Design



The App Server enqueues the notification and returns. The Workers take it and call the Push Provider. That Link has a **Timeout** and a **Retries** policy, because the provider is a third party and the Worker has to protect itself from it.

## Why it works

The user never waits for the send. A stalled provider holds a Worker for seconds, not for the default wait, and the Queue absorbs the backlog while the provider recovers. Retries with backoff cover a short blip without hammering the provider.

A managed provider costs nothing to place and charges per message, so you pay for volume and run no sending fleet.

## What it costs

Delivery is at least once, so a notification can arrive twice unless the send is idempotent. The game has no topic with many subscribers, so this shows the simplest fan-out: one task, one provider. A real platform adds topics, and you can read about them on [Publish-subscribe](https://wiki.playquorum.dev/patterns/publish-subscribe.md). Backoff delays a failed send, so urgent messages lose time.

## In Quorum

The [Push Provider](https://wiki.playquorum.dev/components/msgp.md) needs [Notifications](https://wiki.playquorum.dev/research/notifications.md), and it sits behind the [Queue](https://wiki.playquorum.dev/components/queue.md) and [Worker](https://wiki.playquorum.dev/components/worker.md) of the last rung. Both Link settings need [Timeouts and retries](https://wiki.playquorum.dev/research/timeouts.md), and backoff needs [Backoff with jitter](https://wiki.playquorum.dev/research/backoff-jitter.md). The [Timeouts](https://wiki.playquorum.dev/patterns/timeouts.md) and [Retry with backoff](https://wiki.playquorum.dev/patterns/retry-with-backoff.md) pages explain the two Link settings. The next rung covers spiky work with no box: [Functions for spiky jobs](https://wiki.playquorum.dev/patterns/functions-for-spiky-jobs.md).

Source: https://wiki.playquorum.dev/patterns/message-platform-for-fan-out
