

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: Dead Letter
incomplete
2: Ack and Nack
incomplete
3: Dead Letter Queue
incomplete
4: Exact Delivery
incomplete
5: Nack Requeue
incomplete
6: Nack Requeue Fix
incomplete
This lesson's interactive features are locked, please to keep using them
So we've seen that NackDiscard removes a message from the primary queue, but what if we want to retry the message? As a general rule, you want to split your consumer's errors into two classes:
If you NackRequeue a message, it will be requeued to the primary queue to be processed again. This can be very bad if the error isn't transient as it will just be reprocessed over and over forever, blocking other messages and incurring large processing costs.
I call this "Requeue Hell", and I've been forged in its fires.
Only NackRequeue messages if you're confident a retry will resolve the issue!
Let's hook up the "war" logic of Peril!
gamelogic.RecognitionOfWar{
Attacker: move.Player,
Defender: gs.GetPlayerSnap(),
},
Watch as the queue freaks the hell out. You should see thousands of messages being requeued and processed over and over. It's a beautifully terrifying sight.
Run and submit the CLI tests with the madness going.
When you're done, kill your clients to stop the madness.