Skip to content
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

Event sourced process managers #137

slashdotdash opened this issue Feb 6, 2018 · 0 comments

Event sourced process managers #137

slashdotdash opened this issue Feb 6, 2018 · 0 comments


Copy link

@slashdotdash slashdotdash commented Feb 6, 2018

Process managers currently persist their state after each handled event. They also use a single all stream subscription to route events to an instance and for the instance to handle the event.

The next release of EventStore has support for linking events. This feature makes it possible to use event sourcing to build a process manager instance's state. Events can be linked from the source stream to a stream dedicated to the process manager instance. To rebuild its state will require fetching and applying the events, exactly as aggregates work.

Using a stream of linked events will also allow individual process manager instances to have their own subscription to their own stream of events. This will allow instances to process events concurrently, rather than being blocked by each other. The process router will still use an all stream subscription, but it will now just be linking events to the target instance's event stream. The instance's own subscription will trigger its event handling and command dispatch.

Due to the potentially large number of process manager instances running they should be automatically shutdown after an inactivity timeout period (#148).

The benefit of this approach is that event sourcing allows state to be modified by changing the process manager behaviour and rebuilding. Whereas currently the state cannot be amended from historical events.

It should still be possible to snapshot process manager instance state using the same snapshot behaviour as aggregates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant