Definition

What is queue?

Quick definition

An ordered collection of items awaiting processing, where items are typically handled in first-in-first-out (FIFO) order. Queues manage workflows by regulating item flow and preventing bottlenecks.

A queue is a fundamental data structure and operational concept used to manage sequential processing of items, requests, or tasks. In software systems, queues enforce order and control the rate at which items flow through different processing stages. Items enter at one end (enqueue) and exit at the other (dequeue), following the FIFO principle in most cases, though priority queues allow items to be processed based on importance rather than arrival time.

In Kanban systems and workflow management, queues represent the collection of work items waiting to be picked up by team members. Each Kanban column effectively acts as a queue with a WIP (Work-In-Progress) limit, ensuring that items don't accumulate faster than the team can process them. This prevents bottlenecks and maintains steady throughput.

In distributed systems and AI agent contexts, message queues (like those in MCP protocols and async workflows) decouple components, allowing them to operate independently while maintaining ordered communication. Queues enable reliable task distribution, retry mechanisms, and fair resource allocation across multiple agents or services. Understanding queue behavior is essential for optimizing latency, throughput, and system resilience.

Example

How it shows up in practice

A Kanban board's 'Todo' column acts as a queue. Items wait there until a team member has capacity to move them to 'In Progress'. With a WIP limit of 3, the queue prevents overwhelming the development team.

Frequently asked questions

What's the difference between a queue and a stack?

A queue uses FIFO (first-in-first-out) ordering, while a stack uses LIFO (last-in-first-out). Queues are better for maintaining order in workflows; stacks are useful for undo/redo operations.

How do WIP limits relate to queues in Kanban?

WIP limits control queue size by capping how many items can exist in a column at once. This prevents queues from growing unbounded and maintains healthy workflow velocity.

What is a priority queue in AI agent systems?

A priority queue processes high-importance items before lower-priority ones, even if they arrived later. Useful for handling urgent requests or critical tasks in multi-agent workflows.

Why are message queues important in distributed systems?

Message queues decouple services, enable reliable delivery, support retries, and allow asynchronous processing. Essential for building scalable, resilient AI agent orchestration systems.

Related terms

Want to turn this concept into a board?

Browse templates that use this vocabulary in real workflows.