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
Use the RabbitMQ architecture diagram to trace the path from producers through exchanges to routed queues and consumers. section 5.3.1























