RabbitMQ
A mature, battle-tested message broker. Producers publish messages to exchanges, which route them to queues that consumers drain β with acknowledgements, redelivery, dead-letter queues, and routing rules that give you real delivery guarantees. Where Redis is a fast store you can use as a queue, RabbitMQ is a purpose-built broker: itβs the right tool when a job must not be silently lost.
Links
Description
- Exchanges + queues + bindings β flexible routing (direct, topic, fanout, headers).
- Acknowledgements & redelivery β consumers ack on success; unacked messages requeue on failure/crash.
- Dead-letter queues (DLQ) β failed/expired messages divert to a DLQ for inspection and alerting.
- Durability β persistent queues/messages survive broker restarts.
- Prefetch / QoS β control how many in-flight messages a consumer holds.
- Protocols β AMQP 0-9-1 natively; also MQTT, STOMP, and an HTTP API.
Download or use
docker run -p 5672:5672 -p 15672:15672 rabbitmq:management # broker + web UI- Site: rabbitmq.com
- Docs: rabbitmq.com/docs
Reasoning for
RabbitMQ is the queue at the heart of Qamera AIβs asynchronous image-generation pipeline β but used in a deliberate HTTP variant: the web app publishes a run_due message to RabbitMQ, a thin Node worker on Hetzner consumes it and enforces platform/per-account limits, then calls back into the web app over authenticated HTTP to do the actual generation. This keeps the heavy domain logic in the Next.js app (and out of the worker), while RabbitMQ provides the durable hand-off, retries, and dead-letter alerting (wired to ClickUp + email) that a credit-charging pipeline needs. I reached for RabbitMQ over Redis here precisely because lost or double-processed jobs would mean mischarged credits β the stronger acking/DLQ semantics earn their keep.
Alternatives considered
- Redis (+ Celery/BullMQ) β simpler and already-present; fine for Travelcast AI/Tech To The Rescue, but weaker delivery guarantees than a real broker.
- AWS SQS / Google Pub/Sub β managed queues, no ops; chosen against to avoid cloud lock-in and keep the self-hosted Docker stack portable.
- Kafka β built for high-throughput event streaming/replay; overkill for a task queue at this scale.
- NATS β lightweight and fast; smaller ecosystem and fewer built-in delivery guarantees than RabbitMQ.
Resources
- π RabbitMQ docs
- π Tutorials (work queues, routing)
- π§© Dead letter exchanges
Template: tool