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

# AMQP DLQ Backend

> Publish-only DlqStore implementation for FlowWarden Stream Core — routes failed events to an AMQP 0.9.1 topic exchange instead of MongoDB

`flowwarden-amqp` provides an AMQP 0.9.1 publish-only implementation of the [`DlqStore`](/reference/dlq-store) SPI defined in [FlowWarden Stream Core](/quickstart). It is a drop-in alternative to the default MongoDB DLQ backend — useful when your Spring Boot application already runs RabbitMQ (or any AMQP 0.9.1 broker) and you'd rather route failed events to a queue that the rest of your platform can consume.

The implementation is broker-neutral: RabbitMQ is the reference target, but LavinMQ, Apache Qpid, ActiveMQ Classic, CloudAMQP and AWS MQ for RabbitMQ all work without code changes.

## When to use

* Your platform already brokers messages over AMQP and you want failed events routed there too — for fanout to alerting, ticket creation, audit pipelines, or a downstream replayer.
* You want failed events **out of the MongoDB perimeter** — different retention policy, different ops team, different SLOs from your operational data.
* You want **per-stream routing** — one exchange per criticality, one routing key per service — so downstream consumers can bind selectively.

## When not to use

* You need to **inspect the DLQ from inside the application** (`findById`, `findByStreamName`) — by design these return empty here. Stay on the default `MongoDlqStore` if your operators replay through the FlowWarden API or the Console.
* You don't already operate an AMQP broker — `MongoDlqStore` auto-configures with zero additional infrastructure and provides the same persistence guarantees.
* You expect FlowWarden itself to drive replay — replay belongs to your AMQP consumer, not to the framework.

## How it fits

```mermaid theme={null}
flowchart LR
    annotations["@ChangeStream<br/>@DeadLetterQueue"] --> core["FlowWarden Stream Core"]
    core -->|DlqStore SPI| spi{DLQ backend}
    spi -->|default| mongoDlq["MongoDlqStore<br/>(_fw_dlq collection)"]
    spi -->|flowwarden-amqp| amqpDlq["AmqpDlqStore<br/>(RabbitTemplate)"]
    amqpDlq -->|publish| exchange["Topic exchange<br/>routing key = prefix + streamName"]
    exchange --> consumers["Your AMQP consumers<br/>(alerts, audit, replayer)"]
```

The two backends are mutually exclusive at the SPI level (a single `DlqStore` bean wins). When `flowwarden-amqp` is on the classpath and a `RabbitTemplate` is available, it takes precedence over the Mongo default; user-declared `DlqStore` beans win over both. A hybrid that writes to both stores is achievable with a small composite bean — see [Configuration → Mixing backends](/amqp/configuration#mixing-backends).

## Compatibility

| Component              | Minimum                                          | Recommended    |
| ---------------------- | ------------------------------------------------ | -------------- |
| Java                   | 17                                               | 21             |
| Spring Boot            | 3.2.x                                            | 3.2.x+         |
| Spring AMQP            | 3.2.x (via Boot BOM)                             | 3.2.x+         |
| AMQP broker            | 0.9.1 (RabbitMQ 3.8+ / LavinMQ 2.x+ / Qpid 8.x+) | RabbitMQ 3.13+ |
| FlowWarden Stream Core | 1.0.0-rc.3                                       | 1.0.0-rc.3+    |

<Note>
  `flowwarden-amqp` is currently `1.0.0-rc.1` (pre-release). The public API of the annotation, properties, and SPI implementation is stable; the JSON wire schema is versioned via the `flowwarden-schema-version` AMQP header so any breaking change is detectable downstream.
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/amqp/quickstart">
    Add `flowwarden-amqp` to your project in 5 minutes.
  </Card>

  <Card title="Configuration" icon="gear" href="/amqp/configuration">
    Properties reference, wire format, per-stream overrides, confirm-mode trade-offs.
  </Card>

  <Card title="@DeadLetterQueue annotation" icon="trash" href="/reference/dead-letter-queue">
    The user-facing annotation this backend handles failed events for.
  </Card>

  <Card title="DlqStore SPI" icon="plug" href="/reference/dlq-store">
    The contract `AmqpDlqStore` implements.
  </Card>

  <Card title="Source on GitHub" icon="github" href="https://github.com/flowwarden-io/flowwarden-amqp">
    Browse the `flowwarden-amqp` source, issues, and releases.
  </Card>
</CardGroup>
