

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: Nodes and Clusters
incomplete
2: Backpressure
incomplete
3: Healthy Queues Are Empty
incomplete
4: Prefetch
incomplete
5: Quorum Queues
incomplete
This lesson's interactive features are locked, please to keep using them
When you run a consumer, you may have assumed this process for message consumption:
But that would slow everything down to a crawl due to the full network round trip for every message. Instead, RabbitMQ allows you to prefetch messages. When you prefetch messages, RabbitMQ will send you a batch of messages at once, the client library will store them in memory, and you can process them one by one. Much faster. The diagram shows 3 consumers each prefetching batches of 2.
By default, we were allowing one client to prefetch all 10,000 messages from the server! That means other clients couldn't get any messages until the first client had processed all 10,000. We need to limit the prefetch count.
This will ensure that each client only prefetches 10 messages at a time. This will allow other clients to get messages while one client is processing.
Run and submit the CLI tests with an empty game_logs queue.