

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 8
click for more info
Not enough gems
Cost: 6 gems
1: Data Serialization
incomplete
2: Game Logs
incomplete
3: Consume Logs
incomplete
4: Schema
incomplete
This lesson's interactive features are locked, please to keep using them
Now let's consume the logs and save them to disk.
*.log
I used generics to create a helper function to share duplicate code between SubscribeJSON and SubscribeGob. If you're curious this was the function signature of the helper:
func subscribe[T any](
conn *amqp.Connection,
exchange,
queueName,
key string,
simpleQueueType SimpleQueueType,
handler func(T) Acktype,
unmarshaller func([]byte) (T, error),
) error
game.log file contains the logs you expect.game_logs queue are consumed using the Rabbit UI.Run and submit the CLI tests.