You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can a command fire more than one event? Is that supported by the library? I've noticed a missmatch in the revision field when I fire 2 events from the same command, like if one revision is actually skipped.
e.g.:
command 'openTask' could fire two events 'taskOpened' and 'urgentTaskOpened' if the task is urgent.
If the aggregate 'task' has revision 'n' in this scenario, the 2 events will have revision 'n+2' into the eventstore
The text was updated successfully, but these errors were encountered:
Of course it can, it is a pretty common situation, they are all committed in a single commit.
The revision, however, is incremented with each single event.
ie. a revision is not skipped, the first event would have revision of previousRevision+1, the next one of previsousRevision+2, and the new state of the aggregate would have the same revision as the last event in the commit. This is the expected behaviour.
I Really couldn't tell without at least seeing a snippet.
As this behaviour is well tested ( on both eventstore and domain side ), I would guess that there is some kind of misunderstanding of the expected behaviour.
Can a command fire more than one event? Is that supported by the library? I've noticed a missmatch in the revision field when I fire 2 events from the same command, like if one revision is actually skipped.
e.g.:
command 'openTask' could fire two events 'taskOpened' and 'urgentTaskOpened' if the task is urgent.
If the aggregate 'task' has revision 'n' in this scenario, the 2 events will have revision 'n+2' into the eventstore
The text was updated successfully, but these errors were encountered: