Message queues
A backlog of messages that workers process asynchronously, one after another.
A message queue is a backlog of work that consumers process asynchronously, one message after another, or a few at a time. Producers drop a job on the queue and return. Workers pull jobs when they have capacity. This is how you absorb a spike, retry a failed call, or move a slow task off the request path. Cloudflare Queues and many older brokers all implement this idea.
Use a queue when the work is similar, can be retried, and does not need a long, named multi-step process. Email sends, thumbnail jobs, and 'refresh this record' tasks are typical. If the job has several waits and a business lifecycle, a durable workflow may be a better fit. If you are transporting a continuous log to many consumers, look at an event pipeline.
Make handlers idempotent, set a retry and a dead-letter policy, and keep the payload small — an id plus a type, not a huge blob. Visibility timeouts and poison messages are the details that hurt in production, so write them down early.
A queue should make the system duller, not more exciting. If you cannot tell how old the oldest message is, or who is consuming it, the backlog will surprise you.