Skip to content
Glossary · System design

Message queue

Also called job queue, task queue.

Definition

A buffer that holds messages, such as tasks or events, until a worker is ready to process them, so the sender does not have to wait.

Last updated

What it is.

A producer puts a message on the queue, for example send this email or resize this image. One or more workers take messages off, do the work and confirm. If a worker fails, the message goes back on the queue or to a dead letter queue for review.

Queues are the plumbing behind event-driven architecture, background jobs and smoothing spikes: the queue grows during a rush and drains afterwards.

Why it matters

Slow or unreliable work, such as calling third-party APIs, generating reports or running AI tasks, should not make users wait or fail their request. A queue moves it to the background and retries it safely, and workers can scale on queue length.

In a product build

We use a managed queue, make every worker idempotent because messages can be delivered more than once, set retry limits with backoff, send poison messages to a dead letter queue and alert on queue age, not just length.

Watch out

Common mistakes.

  1. 01

    Assuming each message is delivered exactly once.

  2. 02

    Retrying forever, so one bad message blocks the queue.

  3. 03

    No alert when the queue backs up, so users wait hours before anyone notices.

Tools

Work it out with a tool.

Related

Related terms.

Building something with this? Ask an engineer.

OceanLab designs and builds production software. Tell us what you are planning and we will reply with how we would approach it.

OceanLab

Enterprise Software Engineering - Human + AI

Languages

Locations

Global Headquarters

21 Merchant Road, 3rd Floor, Singapore 058267

Main corporate office and leadership operations

North America Office

548 Market Street, PMB 12472, San Francisco, CA 94104

Client operations and business development

India Office

402 Shivalik Shilp II, SG Highway, Ahmedabad 380015

Engineering and delivery center

© 2026 - Copyright. All Rights reserved OceanLab