

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
Not enough gems
Cost: 6 gems
1: Consumers
incomplete
2: Multi Consumers
incomplete
3: Routing Patterns
incomplete
4: Naming
incomplete
This lesson's interactive features are locked, please to keep using them
A queue can have 0, 1, or many consumers.
Multiple queues each receive a copy of a message, but multiple consumers on one queue split the messages so each message is handled once.
The exclusive flag can be used to tell the RabbitMQ server to only allow one consumer to connect to the queue at a time. I've found that often my pub/sub needs fall into one of two categories:
Answer the questions about the following examples.
Pretend we have an architecture where users can connect to one of three game servers for live game updates. When a player's guild goes into battle, we need to notify the connected user that they won. The trouble is, we don't know which server the user is connected to. For simplicity, we decide to send the message to all three servers, and let the user's server handle the message (send it if the user is connected, ignore it if they aren't).
Pretend we have to resize, compress, and upload images to a cloud storage bucket. We have 20 servers that can handle the image processing. We want to make sure that each image is only processed once, but we don't care which server processes it.