> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bbrands.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Failed messages

> Which notification messages end up as failed messages, how to read their error and how to get them out again with Replay, including what happens when their send already ended Failed.

## At a glance

| Field | Value |
| - | - |
| Status | **Available** |
| Route | `/{locale}/notification/operations`, **Failed messages** card |
| Menu | Notifications › Operation › **Queues** › **Failed messages** |
| Role | Notification Admin and Notification Operator |
| Permission | `notification-lane:operate` (see and replay the notification ones); `notification:resend` too when the send of the message already ended **Failed**; `queue-event:find-all` also lets you see them |
| Feature flag | None |
| Last verified | 2026-11-12 against `develop` (`679a4e0c5`) plus PR for issue #2201 |

## What it is for

A failed message ("mensaje fallido", "dead letter") is a notification the platform could not hand to the provider
after every automatic try, or one that arrived broken. It does not disappear: it stays in this list with its last
error, so you can see what failed, fix the cause and get the notification out again with **Replay**.

## How to get there

* Open [**Operation › Queues**](https://docs.bbrands.io/enterprise/notifications/operation/queues.md) and scroll to the **Failed messages** card, below **Lanes**.

## What you see

![Failed messages card of the Queues screen: a table with Received, Type, Lane, Attempts and Last error, with rows notification.email on notification-email (5 attempts, Resend 503: service temporarily unavailable), notification.push on notification-push (5 attempts, OneSignal 500), email.cancellation on notification-email (5 attempts, Resend 503: service temporarily unavailable) and notification on notification (1 attempt, Invalid notification message: channel: Required), each with Replay; the Scheduled sends card below.](https://mintcdn.com/bbrands/60Dos-kygsMSvNkG/images/enterprise-notifications-screens/queues/failed-messages.en.desktop.webp?fit=max\&auto=format\&n=60Dos-kygsMSvNkG\&q=85\&s=63c7d3c9c3576102f8272bad051b2941)

Four failed messages: an email, a push and a subscription email whose provider was down, and a malformed message.

| # | Element | What it does |
| - | - | - |
| 1 | **Received** | When the message entered the queue |
| 2 | **Type** | The message type: `notification.email`, `notification.push`, … one per channel; `notification` alone when it carried no channel; `email.cancellation`, `email.downgrade`, `email.product.new`, … for the subscription emails that travel on the email lane |
| 3 | **Lane** | The lane it was on |
| 4 | **Attempts** | How many times the platform tried. 5 is the normal limit; 1 means it was refused at once |
| 5 | **Last error** | What the provider or the platform answered the last time |
| 6 | **Replay** | Sends the message again once, after a confirmation. If its send already ended **Failed**, it retries that send, as **Retry** does in **Sends** |

The list shows the 20 most recent.

## Step by step

### Understand a failed message

**1. Read the error**

A `503`, a `500` or "temporarily unavailable" means the provider was down: the message itself is fine. An
"Invalid notification message" means the message was broken and needs the technology team.

**2. Check the provider**

If several messages of the same lane failed in the same minutes, it was an outage of that provider. Check its
status before acting.

**3. Find the send**

Every failed delivery also marks its send as **Failed** and fires the fallback channel if the event has one.
Find the customer's send in [**Operation › Sends**](https://docs.bbrands.io/enterprise/notifications/operation/sends.md) or [**Operation › Traceability**](https://docs.bbrands.io/enterprise/notifications/operation/traceability.md).

### Replay a failed message

**1. Make sure the cause is gone**

The provider is up again, or the technology team fixed the broken message. Replaying before that only fails
again.

**2. Press Replay**

On the message's row, press **Replay**. The dialog **Replay the failed message?** explains: "Sends the message
again with the same content, once. If its send ended Failed, the send is retried as from Sends and the reason
stays in its history. If it fails again, it returns to this list with the new error."

![Dialog Replay the failed message?: Sends the message again with the same content, once. If its send ended Failed, the send is retried as from Sends and the reason stays in its history. If it fails again, it returns to this list with the new error; buttons Cancel and Replay, over the Failed messages table.](https://mintcdn.com/bbrands/60Dos-kygsMSvNkG/images/enterprise-notifications-screens/queues/replay.en.desktop.webp?fit=max\&auto=format\&n=60Dos-kygsMSvNkG\&q=85\&s=362bbd2d9512a92a4b5f687d883e1790)

The replay confirmation.

**3. Confirm**

Press **Replay**. You see **Replay started** · "The message is back on its lane." and the row leaves the list.

**4. Check the send**

In [**Operation › Sends**](https://docs.bbrands.io/enterprise/notifications/operation/sends.md), the send moves to **Queued** and then to **Sent**. When its send had ended
**Failed** (the usual case, because using up the retries marks it **Failed**), its history shows the retry with
the reason "Reprocesado desde Mensajes fallidos". If the message fails again, it comes back to this list with the
new error.

### Retry or resend the send instead

**1. Open the send**

In [**Operation › Sends**](https://docs.bbrands.io/enterprise/notifications/operation/sends.md), open the failed send.

**2. Retry or resend it**

Retry it or resend it, with your own reason. This is still valid, and it is the way when your role has
`notification:resend` but not `notification-lane:operate`. The failed message stays in this list until someone
replays it or the technology team removes it.

## Business rules

| ID | Rule |
| - | - |
| R-01 | The platform tries each message up to 5 times, waiting longer each time (from 5 seconds up to a few minutes). Network or proxy errors get up to 12 tries over about 45 minutes before giving up |
| R-02 | After the last try the message becomes a failed message, its send is marked **Failed** and the event's fallback channel fires, if it has one |
| R-03 | A send the provider already accepted is never marked failed, and never fires a fallback |
| R-04 | A malformed message is not retried: it goes straight to this list with the validation error |
| R-05 | A failed message stays in the list until it is replayed or removed by the technology team; the send does not go out on its own, and the automatic requeue of stalled messages never touches failed messages |
| R-06 | The list shows every failed message of a notification lane (`notification` and `notification-<channel>`), whatever its type: the notification messages (`notification…`) and the subscription emails that travel on those lanes (`email.cancellation`, `email.downgrade`, `email.product.new`, …) |
| R-07 | Replaying never repeats a delivered send: a message whose send the provider already accepted, or whose send is no longer **Failed**, is skipped when it reaches the provider step. It never touches payments or webhooks |
| R-08 | Each press of **Replay** gives the message exactly one more attempt. The attempt count is kept, so a new failure sends it back to this list at once: it never loops |
| R-09 | When the send of the message already ended **Failed**, Replay retries that send as **Retry** does: the send goes back to **Queued**, a new message is published and the reason "Reprocesado desde Mensajes fallidos" stays in its history. This also needs `notification:resend` |
| R-10 | Two operators pressing **Replay** on the same row publish it only once: the second one gets "it was already replayed" |
| R-11 | Replaying closes the message's open dead letters with the operator who replayed it and the note "Replayed by an operator from Horizon Enterprise". If the publish fails, the message goes back to this list |
| R-12 | Financial message types need an explicit financial confirmation; none of them travels on a notification lane |

## States and messages

| State | What you see | Why | What to do |
| - | - | - | - |
| No failures | "No failed messages." | Every message got out | Nothing |
| Failed message | A row with **Attempts** 5 and the provider error | The provider refused or did not answer | Check the provider, then press **Replay** |
| Broken message | **Attempts** 1 and "Invalid notification message…" | The message arrived incomplete | Escalate to the technology team |
| Replayed | **Replay started** · "The message is back on its lane." and the row leaves the list | The message was published again, or its send was retried | Check the send in **Sends** |
| Back in the list | The same message with a new **Last error** | The new attempt failed too | Check the cause again before replaying |
| Already replayed | **Could not replay** · "Queue event '…' is no longer in the dead letters; it was already replayed" | Someone replayed it first | Refresh the list |
| No button | The rows have no **Replay** | Your role lacks `notification-lane:operate` | Ask a Notification Operator |

## Errors

| Message | Cause | Backend code | Support action |
| - | - | - | - |
| **Could not replay** · "Queue event '…' is no longer in the dead letters; it was already replayed" | Another operator replayed it first | 409 | Refresh the list; check the send in [**Sends**](https://docs.bbrands.io/enterprise/notifications/operation/sends.md) |
| **Could not replay** with a no-permission message | Missing `notification-lane:operate`; the message is not on a notification lane; or its send ended **Failed** and your role lacks `notification:resend` | 403 | Ask for the Notification Operator role, or retry the send from **Sends** |
| **Could not replay** asking for a financial confirmation | The message is of a financial type (`requires_confirm_financial`) | 409 | Escalate to the technology team |
| **Could not replay** with a server error | Server error; the message stays in the list | 5xx | Try again later |

## Why it works this way

![Diagram: a queued send goes through up to five delivery attempts; if the provider accepts it the send is Sent and delivery events follow; if every try fails it becomes a failed message in Queues, the send is marked Failed and its fallback channel fires, and the operator retries or resends it from Sends. A malformed message goes to failed messages without retries.](https://mintcdn.com/bbrands/_njGa-AUVffoWNDA/images/notification-user-manual/failed-messages.svg?fit=max\&auto=format\&n=_njGa-AUVffoWNDA\&q=85\&s=c7ca1f768aa3a50a2b461bda18b29867)

After the last try the send is Failed, its fallback fires and the message waits in Failed messages.

Providers fail now and then for a few seconds, so the platform retries on its own before giving up. Keeping the
messages that still failed, instead of dropping them, lets the operator see the cause and decide; marking the send
as failed at the same time makes the customer's history honest and lets the fallback channel try another way.

Because the send is already **Failed** when its message lands here, republishing the message alone would be skipped
by the delivery step, which never repeats a failed send. That is why Replay retries the send itself, with a fixed
reason in its history, and asks for the same permission as **Retry**.

## Technical detail

| Aspect | Detail |
| - | - |
| Screen | `notification-operations-screen.tsx` (`DeadLettersSection`), filter `status\|eq\|dlq,lane\|ilike\|notification%` (`NOTIFICATION_DEAD_LETTER_FILTERS`), 20 rows by last update; the list refreshes after a replay |
| Read | `GET /api/v3/queue/event`, limited to the notification lanes for operators (D-32) |
| Replay | `POST /api/v3/queue/event/{id}/requeue`: `queue-event:requeue` or, for a notification lane, `notification-lane:operate`; `requeueQueueEvents` with `allowDeadLetter` reopens one `dlq` row (`dlq` → `enqueued`, one conditional update), republishes it with the same `queue_event_id`, adds 1 to `attempts_replay_count`, records a `queue_replay_job` and resolves its open `queue_dead_letter` rows; on a publish failure the row goes back to `dlq` |
| Failed send | `lib/endpoint/queue-event/requeue/notification-dead-letter-replay.ts` (D-79): a `notification…` message whose send is `failed` is retried (`failed` → `queued`, `horizon.queued` event with `retry: true`, `audit_log`), needs `notification:resend`; workflow `reopenDeadLetter`, `closeDeadLetterAsRetried` (`dlq` → `processed`, context `replayed_as: notification-retry`) and `resolveDeadLetters` in `queue-event-workflow.service.ts` |
| Retries | `createDefaultQueueRetry(DEFAULT_MAX_ATTEMPTS = 5)` and `INFRA_MAX_ATTEMPTS = 12` in `lib/queue/common/queue-consumer-wrapper.ts`; exhaustion in `handleExhaustedNotification` (`lib/queue/notification/handlers/notification-unified.handler.ts`) |
| Malformed | `lib/queue/notification/notification-queue-dead-letter.ts` |
| Texts | `messages/{es,en}.json` › `modules.notification.operations` and `modules.notification.operations.replayDialog` |

## FAQ and support cases

> [accordion] The provider was down for an hour. Do I have to replay every message?
>
> The sends that failed during the outage are marked **Failed** and their fallback channel already fired. Replay
> the ones that matter (for example a security code is useless an hour later, a contract signed is not), here or
> with **Retry** in [**Operation › Sends**](https://docs.bbrands.io/enterprise/notifications/operation/sends.md).

> [accordion] Can Replay send a notification twice?
>
> No. Each press gives one attempt, two presses on the same row publish once, and a send the provider already
> accepted is skipped.

> [accordion] Why does a failed message have only 1 attempt?
>
> It was malformed, so retrying could not fix it. Send the error to the technology team.

> [accordion] Does a failed message mean the customer got nothing?
>
> Not always: if the event has a fallback channel (for example the email of a push), that one went out. Check the
> occurrence in [**Operation › Traceability**](https://docs.bbrands.io/enterprise/notifications/operation/traceability.md).

## Related and history

* [Queues](https://docs.bbrands.io/enterprise/notifications/operation/queues.md)
* [Guide: Failed messages pile up](https://docs.bbrands.io/enterprise/notifications/guides/failed-messages.md)
* [Delivery events](https://docs.bbrands.io/enterprise/notifications/operation/delivery-events.md)
* [Edit rules](https://docs.bbrands.io/enterprise/notifications/catalog/rules.md) (fallback channel)

| Date | Change |
| - | - |
| 2026-11-11 | First version |
| 2026-11-11 | Links to the Sends and Traceability pages and to the incident guides |
| 2026-11-12 | Replay works (issue #2201 fixed): it republishes the message once or, when its send ended **Failed**, retries the send; new dialog copy; the list shows the subscription emails of the notification lanes |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.