Hacker News new | ask | show | jobs
by iliketoworkhard 2488 days ago
Great points! Would you mind elaborating to a relatively inexperienced engineer how the following scenarios can end up happening?

> queue sending to dead endpoints

> circular queue problem

1 comments

> queue sending to dead endpoints

This is a subcategory of "app fails post-queue." Suppose you build a happy working queue, and someday somebody releases a new version of the queue consumer that isn't backward compatible and therefore is broken. How many messages will be lost on production before this caught? Do you have a way to recover those messages?

> circular queue problem

This is the queue version of an infinite loop. Suppose you have an infinite loop in your code, you'll crash the app but catch it very quickly.

Suppose queue message X calls a function which generates ANOTHER queue message X (infinite loop). This will be VERY HARD to catch and slow down the queue system progressively until its overwhelmed (likely only caught on prod).

Thank you! Sounds like a case where a consumer was updated but producer wasn't.. more room for error for the dev

Interesting point about things getting caught on prod, no amount of stress testing can sometimes reproduce these finicky bugs :)

Logic spread out as different code parts that consumes events and then creates new events can be very hard to follow. A simple loop might be obvious but when part A creates event B and part C reads event B and then creats a new event that part A will read it is harder to find. It may be many steps and also some logic that makes it only happen for specific payloads.

Great explanations by the way but I try to avoid having too much logic spread out over different events.