We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Nack Requeue Fix

Well, we don't want to be stuck in requeue hell. Let's fix that.

Assignment

It makes sense to requeue on a network failure, but we shouldn't requeue if the message was successfully processed. Additionally, I want to call attention to how the "war" handler works: notice that if the outcome is "not involved" the client requeues the message. That's so that another client can pick it up and try to process it. The event can only be processed successfully by a client involved in the war.

It's a bit janky, but it demonstrates how requeueing works, so here we are.

You should see a message indicating that Washington lost the war, and importantly, no more requeue hell.

If even after making these changes you seem to be stuck with a stream of messages, you can safely delete or purge the war queue via the management UI.