-
Notifications
You must be signed in to change notification settings - Fork 3
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
Subscribing to events using Subscriber should be a one-liner #34
Comments
One problem with this design is that the events being handled have no relationship with the events being subscribed to
vs. Whatever getEventHandler knows how to process. getEventHandler should tell Subscriber what to subscribe to. |
One possibility is an event handler looks like this:
In other words its a nested map: aggregate -> aggregateEvent -> eventHandler The high-level subscription API looks something like this:
|
@dartvandru
It should really be something like this.
And then call subscribe() one or more times.
Internally, subscribe() can create a EventDispatcher etc but that should not be part of the API. |
The developer should not need to write this.
The text was updated successfully, but these errors were encountered: