

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 10
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
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.
func SubscribeJSON[T any](
conn *amqp.Connection,
exchange,
queueName,
key string,
queueType SimpleQueueType, // an enum to represent "durable" or "transient"
handler func(T),
) error
func handlerPause(gs *gamelogic.GameState) func(routing.PlayingState)
Run and submit the CLI tests with the server and client still running.