Skip to content
>devspeak
← glossary
level 7Architecture

Queue

also: queues, queued, message queue, job queue

A waiting line for tasks. One part of your app adds tasks to the line, and another part takes them off and handles them in order.

a bit more technical

A service or data structure (BullMQ on Redis, Amazon SQS, RabbitMQ) that stores jobs or messages until a consumer processes them, usually first in, first out. Queues separate the code that creates work from the code that does it, absorb spikes, and allow retries.

picture it

The ticket rail in a busy kitchen. Waiters clip orders on; cooks take them off one by one. Waiters don't wait for each dish to be cooked before taking the next order.

why it matters

When an agent suggests "putting it on a queue", the work will happen later, not instantly. That changes what users see, and you need a plan for tasks that fail.

what your agent might say
agent
I'll push each image-resize request onto a queue, so the upload returns immediately and resizing happens in the background.
how you might use it
you → your agent
If we add a queue for sending receipts, what happens when a send fails? Make failed jobs retry a few times, then log them. Don't drop them silently.
common mistake

Thinking the queue does the work. The queue only holds tasks. A separate worker takes them off the queue and does them.