- #1
SlurrerOfSpeech
- 141
- 11
Let's say I have a service that publishes events, like
eo ("Bought 100 shares of AAPL")
e1 ("Bought 100 shares of T")
e2 ("Sold 500 shares of TSLA")
and there exist stateful services subscribing to the events and whose state depends on the events being processed successfully and in the correct order.
There are many things that can go wrong on the subscription side:
For example, let's a service processed e0 and e2 but not e1, let's say because e1 somehow got lost. Maybe the subscribing service keeps a record of events it processed and knows once it sees e2 that it needs to first process e1 and can get it from some service that stores all the events.
eo ("Bought 100 shares of AAPL")
e1 ("Bought 100 shares of T")
e2 ("Sold 500 shares of TSLA")
and there exist stateful services subscribing to the events and whose state depends on the events being processed successfully and in the correct order.
There are many things that can go wrong on the subscription side:
- A subscribing service fails to process an event and is not able to try to re-process it, leading to a contaminated state.
- A service "successfully" processes the event, but because of a bug in the processing, it actually failed to process it. This is actually equivalent to the first bullet point.
For example, let's a service processed e0 and e2 but not e1, let's say because e1 somehow got lost. Maybe the subscribing service keeps a record of events it processed and knows once it sees e2 that it needs to first process e1 and can get it from some service that stores all the events.