liveBook · Manning

Queue

As explained in Kafka for Architects

A queue is an ordered messaging destination in which messages wait for delivery to consumers.

A queue is a point-to-point messaging destination: a producer sends a message for one consumer, and the message is removed after consumption. This differs from publish-subscribe topics, where multiple consumers can independently receive the same message. section 5.3.1 section 5.2.1

Queue-based messaging is useful when work must be assigned to one consumer rather than broadcast:

  • Use point-to-point delivery when exactly one consumer should process each message, such as a task assigned to a specific worker. section 5.2.1
  • Use a queue for push notifications or other workloads where duplicate processing by multiple consumers is undesirable. section 5.2.1
  • In RabbitMQ, producers send messages to exchanges, which route them to queues using routing rules and message content. section 5.3.1
  • In Apache Pulsar, a queue can be implemented with a topic and one consumer group; exclusive subscriptions provide single-consumer processing, while shared subscriptions load-balance work. section 5.3.2

Choosing a delivery model

A worker-assignment service should use point-to-point delivery when only one worker may claim each task. A notification broadcast instead fits publish-subscribe, allowing every subscribed consumer to process the message independently. section 5.2.1

Figure 5.12 RabbitMQ architecture
A diagram of a rabbit

Description automatically generated

Use the RabbitMQ architecture diagram to trace the path from producers through exchanges to routed queues and consumers. section 5.3.1

How Kafka for Architects covers it

How deep it goes
Explains delivery semantics, routing architectures, consumer groups, and subscription modes across messaging systems.
Examples
Illustrates queues through push notifications, worker task assignments, RabbitMQ routing, and Pulsar subscription modes.
What you can do after
Evaluate messaging platforms by delivery semantics, routing control, consumer behavior, and workload requirements.
How it connects
Connects queues with point-to-point messaging, publish-subscribe, topics, exchanges, consumer groups, and subscriptions.

Also explained in

Compare how 24 books explain queue →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka for Architects. The section links point to the parts of the book it draws on.