

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
No active XP Potion
Accept a Quest
Login to submit answers
So as of right now, we have the following setup:
In all seriousness, nothing happens after the message arrives in the queue!
This is where consumers come in. Consumers are programs (like our "client" program) that connect to queues and pull the messages out of them.

Let's configure our client consumers to process the "pause messages" and update their local game state.
export async function subscribeJSON<T>(
conn: amqp.ChannelModel,
exchange: string,
queueName: string,
key: string,
queueType: SimpleQueueType, // an enum to represent "durable" or "transient"
handler: (data: T) => void,
): Promise<void>;
function handlerPause(gs: GameState): (ps: PlayingState) => void;
Run and submit the CLI tests with the server and client still running.
The Boot.dev CLI requires you to be signed in to submit your solution!
Copy/paste one of the following commands into your terminal:
Run
bootdev run e0b196c2-f9c4-4eca-b165-ced8bc8bc4fd
Submit
bootdev run e0b196c2-f9c4-4eca-b165-ced8bc8bc4fd -s
To run and submit the tests for this lesson, you must have an active Boot.dev membership
Become a member to view solution
Using the Bootdev CLI
The Bootdev CLI is the only way to submit your solution for this type of lesson. We need to be able to run commands in your environment to verify your solution.
You can install it here. It's a Go program hosted on GitHub, so you'll need Go installed as well. Instructions are on the GitHub page.