Agents and automation

Message queue

A message queue is a component that holds tasks or events in order until a worker is ready to process them, so systems can hand off work without waiting, absorb spikes in volume and retry failures safely.

A message queue sits between the part of a system that creates work and the part that does it. Instead of processing a request on the spot, the system writes a message to the queue and moves on; workers pick messages up when they have capacity. This matters a great deal for AI builds, because model calls are slow, rate-limited and occasionally fail. A queue keeps a sudden burst of uploads or messages from overwhelming the model provider or timing out the user.

How it works

A producer adds messages to the queue. Each message describes one job, such as "transcribe this call" or "summarise this document". One or more workers take messages from the front, process them and acknowledge success. If a worker crashes or the job fails, the message becomes visible again and is retried; after a set number of failures it moves to a dead-letter queue for inspection. Common choices include Redis-based job libraries, RabbitMQ, Amazon SQS and Kafka, which is more of an event log than a simple queue.

An example: a recruiting tool lets a buyer upload five hundred CVs at once. Each upload becomes a message. A small pool of workers scores CVs with a language model at a pace that stays under the provider's rate limit, and the screen shows progress as messages are completed. Without the queue, the upload would hang, hit limits and lose files.

What it means for cost

Adding a queue means more infrastructure to host and monitor, and more design work: what goes in each message, how many workers run, how failures are retried and how duplicates are avoided through idempotency. For a low-volume automation that handles one item at a time, this can be over-engineering.

It becomes worth paying for when volume is spiky, jobs take longer than a web request should, or the system must not lose work. Ask a builder how the design behaves under a sudden spike, where failed jobs go, and how someone can see what is waiting. The answers say a lot about scalability and error handling.

Common questions

Do no-code tools like n8n or Zapier use queues?

They do internally to run workflows, and n8n can be configured in a queue mode with separate workers when self-hosted. For most small automations that built-in behaviour is enough. A dedicated queue is usually added when a custom application needs control over concurrency and retries.

What is the difference between a message queue and a database table of jobs?

A simple jobs table can work as a queue at low volume and is easy to inspect. Dedicated queues handle concurrency, locking, visibility timeouts and retries out of the box, which matters when many workers process jobs at once.

Related terms

Pricing a build that involves Message queue? Send the brief and get a fixed price set next to the market range.Get a quote