exponentially / extreme

Elixir Adapter for EventStore
MIT License
130 stars 31 forks source link

Buffer StreamEventAppeared until subscription is registered #78

Closed svrdlans closed 9 months ago

svrdlans commented 9 months ago

When subscription is created in task, RequestManager can start receiving live events from EventStore before the subscription is registered in RequestManager state, which can lead to dropping of live events because of that race condition.

Kudos to @tonyvanriet for identifying it and providing a nice test to verify it in https://github.com/exponentially/extreme/pull/77

I've blatantly copied that test and incorporated it into this PR, hoping my giving props to the guy won't make him angry 🙏🏻