How do you process messages in parallel while ensuring FIFO per entity?
问题 Let's say you have an entity, say, "Person" in your system and you want to process events that modify various Person entities. It is important that: Events for the same Person are processed in FIFO order Multiple Person event streams be processed in parallel by different threads/processes We have an implementation that solves this using a shared database and locks. Threads compete to acquire the lock for a Person and then process events in order after acquiring the lock. We'd like to move to