Handling Events Coming in an Unknown Order
event-driven.io·8h·
Discuss: r/programming
Flag this post

After the last article on Dealing with Race Conditions in Event-Driven Architecture with Read Models, I got such a question from Ben:

You described the scenario where you know what events you should receive, just not the order. But what if you don’t know that? For example, you get an ItemRemovedFromCart event, but the item doesn’t exist in your view of the current state of the cart. Is it an invalid event? Or is there an ItemAddedToCart event that hasn’t come through yet?

That’s a good question, and good questions usually require more depth to give a precise answer. That’s what we’re here for!

Let’s fo…

Similar Posts

Loading similar posts...