← Back to Docs

Message Queue Patterns

Reliable async communication between Nimbus services.

Fan-Out

One producer pushes a message to an exchange bound to multiple queues. Each consumer receives its own copy. Ideal for license revocation broadcasts — every regional node gets the invalidation simultaneously.

exchange: "licensing.events" → [queue:na, queue:eu, queue:ap]

Competing Consumers

Multiple workers pull from a single queue. Only one processes each message. Scales horizontally for CPU-bound tasks like Themida wrapping jobs or signature verification batches.

queue: "wrapping.jobs" → [worker-01, worker-02, worker-03]

Dead Letter

Messages that exceed retry limits or fail validation route to a dead-letter queue. Operators inspect DLQ contents to diagnose poisoned payloads without blocking the main pipeline.

queue: "activation.dlq" ← x-max-retries exceeded

Priority Queues

Messages carry a priority header. Higher-priority items dequeue first. Use for heartbeat pings (priority 10) over analytics flushes (priority 1) so licensing health checks never starve.

Idempotency Keys

Attach a unique key to each message. Consumers deduplicate before processing. Prevents double-charging on SellAuth webhook replays when network partitions cause at-least-once delivery.

Nimbus uses RabbitMQ with prefetch=1 for strict ordering. All queues declare durable + lazy mode to survive node restarts. See License Activation Flow for the full pipeline.