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

Introduce IMessageBus unifying interface for Commands+Events #5

Closed
kzu opened this issue Jul 25, 2022 · 0 comments · Fixed by #6
Closed

Introduce IMessageBus unifying interface for Commands+Events #5

kzu opened this issue Jul 25, 2022 · 0 comments · Fixed by #6
Labels
enhancement New feature or request

Comments

@kzu
Copy link
Member

kzu commented Jul 25, 2022

It's quite common for consumers of Merq to provide command handlers that in turn can execute other commands or publish events. So in practice, consumers end up having a dependency on two interfaces whenever this happens.

The combination of both patterns in a single new interface would simplify this scenario, and subsumes both ICommandBus and IEventStream.

The new interface would provide all members of ICommandBus, and for the IEventStream, we'll change the naming to IMessageBus.Observe<TEvent> and IMessageBus.Notify<TEvent>, which are more idiomatic than the existing Of<TEvent> and Push<TEvent>, which wouldn't be quite self-explanatory in the combined interface.

@kzu kzu added the enhancement New feature or request label Jul 25, 2022
kzu added a commit that referenced this issue Jul 25, 2022
The new interface unifies access to both patterns, Commands and Events, so that consumers can take just one dependency.

Fixes #5
kzu added a commit that referenced this issue Jul 25, 2022
The new interface unifies access to both patterns, Commands and Events, so that consumers can take just one dependency.

Fixes #5
@kzu kzu closed this as completed in #6 Jul 25, 2022
kzu added a commit that referenced this issue Jul 25, 2022
The new interface unifies access to both patterns, Commands and Events, so that consumers can take just one dependency.

Fixes #5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant