flowwarden-stream-core. After these three steps, every event that exhausts its retry budget is published to a topic exchange instead of the default MongoDB _fw_dlq collection.
1. Add the dependency
flowwarden-amqp requires spring-boot-starter-amqp on the classpath. Spring Boot creates the RabbitTemplate bean that flowwarden-amqp consumes, and resolves the underlying connection factory.2. Configure the broker
Use the standard Spring Boot properties for the AMQP connection:application.yml
application.yml
3. Use @DeadLetterQueue as usual
Your @ChangeStream / @DeadLetterQueue annotations don’t change. The AMQP-backed bean is picked up automatically when the application context starts:
OrderStream.java
Per-stream overrides
Use@AmqpDlqOptions to override the default exchange or routing key on a specific stream — useful when one criticality tier should fan out to a different queue:
PaymentStream.java
mandatory = true, the broker returns the message to the publisher if no queue is bound to the routing key (instead of silently dropping it) — useful to detect misconfigured consumers. See Configuration → Per-stream overrides.
Verify
Start the application and confirm the wiring. On boot, look for the auto-config log line:FailedEvent document. Expected AMQP headers:
See Also
Configuration
Properties, wire format, per-stream overrides, confirm-mode trade-offs.
@DeadLetterQueue reference
The annotation that drives the
DlqStore SPI this backend implements.Retry & DLQ guide
How retries and DLQ delivery fit together in the core.
DlqStore SPI
The contract behind every DLQ backend.