We publish all events to event grid using a custom class that implements ISubscribeSynchronousToAll.
I have noticed during testing that the event is not published to event grid until the read models that subscribe to that event have been updated.
Could someone confirm that this is the expected behaviour? When an aggregate emits an event, is the event handled in a synchronous manner in a pre-defined order? For example, is it something like this:
- Write event to EventFlow table
- Apply event to aggregate
- Update read models
- Publish to event grid
I'm a bit confused because I had assumed that the subscribers (read model and event grid) would run in parallel.