Consumers
So as of right now, we have the following setup:
- A publisher publishes a message
- The message arrives in an exchange
- The message is routed to queue(s)
- ???
- Profit
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.

Assignment
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.