Skip to main content

What it is for

Once a decision creates a send, the send has to leave without being lost or sent twice, at a pace each provider accepts. This page explains that path. It replaces the old “Architecture” page of the OneSignal era, which now redirects here.
Diagram: the notification queue spreads the sends over six lanes; Email goes to Resend; In-app goes to the Horizon inbox; Push, SMS and Live Activity go to OneSignal; WhatsApp is reserved and has no provider.

Each send enters the notification queue and leaves on its channel's lane towards its provider.

The path of a send

  1. Stored. The send is written in the database with status Queued, or Scheduled if it must wait for quiet hours or a delay.
  2. Ledger first. Before publishing, Horizon writes a queue record (queue_event) in status received. If the publish fails, that record lets a job publish it again later; the send is never stuck without trace.
  3. Published. A short message (notification, channel, correlation) goes to the QStash topic notification. The database row is the source of truth; the message only points to it.
  4. Lane. The channel picks the lane, which controls how many sends of that channel leave at once and how fast.
  5. Consumer. QStash calls Horizon’s notification consumer. It loads the send, marks it Sending and hands it to the channel’s adapter.
  6. Provider. The adapter calls Resend or OneSignal, or writes the in-app item. The send becomes Sent (or Skipped if, for example, no device is subscribed).
  7. Delivery events. The provider reports back by webhook and the send moves to Delivered, Opened, Clicked, Bounced, Marked as spam or Failed (see Providers and webhooks).
  8. Told to subscribers. Each status a send really reaches (Delivered, Opened, Clicked, Bounced, Marked as spam, Failed, Skipped) is published once as an outbound webhook event, and so is every channel the engine decided not to send. An integration that sent through the API gets its own idempotency_key back and can limit its webhook to its gateway (see Event catalogue).

Lanes

There is one queue (notification) and one lane per channel. A slow or failing provider only holds its own lane. The email pace follows Resend’s limit. Pausing a lane in Queues holds its sends without changing any decision; they leave in order when the lane is resumed.

Retries and failed messages

Failed messages are listed in Queues › Failed messages, where an operator replays them after fixing the cause (see Operations runbook).

Manual retry and resend

Retry (POST /{id}/retry) puts a Failed send back in the queue, and replaying a failed message whose send ended Failed does the same. Resend (POST /{id}/resend) creates a new send linked to the original. Before writing anything, both run the check of the release job without the time to live: the event and channel are still on, the address is not suppressed and the customer still accepts the send, honouring the event’s bypasses. Quiet hours and the frequency cap do not apply to a one-off manual send. If the check refuses, the API answers 409 notification-not-eligible with the decision reason and nothing is written. There is no override: lift the suppression or change the preference first.

No send goes out twice

The jobs that keep it moving

Technical detail