-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can a command fire more than one event? #139
Comments
Of course it can, it is a pretty common situation, they are all committed in a single commit. 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. |
We're not having the expected behaviour. Is there something we could missing? |
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: